aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-02-14 07:38:20 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-02-14 07:38:20 +0000
commit7065e130e02c335c37f44874a83c4cbf59dfea89 (patch)
tree5dc2a18484a5feaa3e30f77dadcb35f5c4945fc5 /gcc/cppexp.c
parent52682a1b7720c9f2d8528c3498631636f09ebd90 (diff)
downloadgcc-7065e130e02c335c37f44874a83c4cbf59dfea89.zip
gcc-7065e130e02c335c37f44874a83c4cbf59dfea89.tar.gz
gcc-7065e130e02c335c37f44874a83c4cbf59dfea89.tar.bz2
c-lex.c (lex_number): Only warn traditionally for U suffix outside system macros.
* c-lex.c (lex_number): Only warn traditionally for U suffix outside system macros. * cppexp.c (parse_number): Similarly. * cpplib.h (NODE_SYSHDR, cpp_sys_objmacro_p): New. * cppmacro.c (struct cpp_macro): New member node. (parse_args): Only warn about missing rest args if not a system macro. (funlike_invocation_p): Similarly for uninvoked funlike macros. (cpp_sys_objmacro_p): New. (_cpp_create_definition): Store the node with the macro defn. Remember if the macro is defined in a system header. From-SVN: r39661
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index 11cde70..6aa6d4b 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -203,7 +203,9 @@ parse_number (pfile, tok)
goto invalid_suffix;
op.unsignedp = sufftab[i].u;
- if (CPP_WTRADITIONAL (pfile) && sufftab[i].u)
+ if (CPP_WTRADITIONAL (pfile)
+ && sufftab[i].u
+ && ! cpp_sys_objmacro_p (pfile))
cpp_warning (pfile, "traditional C rejects the `U' suffix");
if (sufftab[i].l == 2 && CPP_OPTION (pfile, pedantic)
&& ! CPP_OPTION (pfile, c99))