This is the mail archive of the
mailing list for the GCC project.
cpplib: spurious warning fix
- To: gcc-patches at gcc dot gnu dot org
- Subject: cpplib: spurious warning fix
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Tue, 20 Jun 2000 14:38:01 -0700
We shouldn't complain about $ in identifiers in skipped conditional
blocks. This gets rid of a spurious warning for some VMS-specific
gunk in collect2.c.
Will commit shortly - test cycle is still running (i386-linux).
* cpplex.c (parse_name): Don't warn about $ in identifiers if
--- cpplex.c 2000/06/01 20:06:55 1.53
+++ cpplex.c 2000/06/20 21:35:53
@@ -1096,7 +1096,10 @@ _cpp_parse_name (pfile, c)
- if (c == '$' && CPP_PEDANTIC (pfile))
+ /* $ is not a legal identifier character in the standard, but is
+ commonly accepted as an extension. Don't warn about it in
+ skipped conditional blocks. */
+ if (c == '$' && CPP_PEDANTIC (pfile) && ! pfile->skipping)
cpp_pedwarn (pfile, "`$' in identifier");
CPP_RESERVE(pfile, 2); /* One more for final NUL. */