This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Tiny tweak for "Use of ANSI string concatenation" warning
- To: gcc-patches at gcc dot gnu dot org
- Subject: Tiny tweak for "Use of ANSI string concatenation" warning
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Fri, 17 Dec 1999 07:15:59 -0500
Don't warn about this in system headers; it is harmless there, and the user
can't do anything about it. glibc 2.1 has a pile of places where this is
used; I go from 200-odd occurrences down to 150.
Another improvement would be to warn only once per sequence of concatenated
strings, but I don't know how to do that.
zw
1999-12-17 03:59 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* c-parse.in (string action): Do not warn about ANSI string
concatenation if in_system_header.
===================================================================
Index: c-parse.in
--- c-parse.in 1999/12/10 21:00:33 1.27
+++ c-parse.in 1999/12/17 11:54:45
@@ -894,7 +894,7 @@ string:
| string STRING
{ $$ = chainon ($1, $2);
ifc
- if (warn_traditional)
+ if (warn_traditional && !in_system_header)
warning ("Use of ANSI string concatenation");
end ifc
}