Commit bb66adca by Kaveh R. Ghazi Committed by Kaveh Ghazi

c-parse.in (string): With -Wtraditional, warn if ANSI string concatenation is utilized.

        * c-parse.in (string): With -Wtraditional, warn if ANSI string
        concatenation is utilized.

        * invoke.texi (-Wtraditional): Document it.

From-SVN: r30863
parent d92398a2
1999-12-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-parse.in (string): With -Wtraditional, warn if ANSI string
concatenation is utilized.
* invoke.texi (-Wtraditional): Document it.
1999-12-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* flow.c (flow_loops_dump): Avoid ANSI string concatenation.
Cast a ptrdiff_t to long and pass it to printf with %ld.
......
......@@ -892,7 +892,12 @@ end ifobjc
string:
STRING
| string STRING
{ $$ = chainon ($1, $2); }
{ $$ = chainon ($1, $2);
ifc
if (warn_traditional)
warning ("Use of ANSI string concatenation");
end ifc
}
;
ifobjc
......
......@@ -746,7 +746,10 @@ primary:
string:
STRING
| string STRING
{ $$ = chainon ($1, $2); }
{ $$ = chainon ($1, $2);
if (warn_traditional)
warning ("Use of ANSI string concatenation");
}
;
......
......@@ -1725,6 +1725,9 @@ The ANSI type of an integer constant has a different width or
signedness from its traditional type. This warning is only issued if
the base of the constant is ten. I.e. hexadecimal or octal values, which
typically represent bit patterns, are not warned about.
@item
Usage of ANSI string concatenation is detected.
@end itemize
@item -Wundef
......
......@@ -859,7 +859,8 @@ primary:
string:
STRING
| string STRING
{ $$ = chainon ($1, $2); }
{ $$ = chainon ($1, $2);
}
;
/* Produces an OBJC_STRING_CST with perhaps more OBJC_STRING_CSTs chained
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment