diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-14 07:38:20 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-14 07:38:20 +0000 |
commit | ae2348f67b17faf87574e6c1e60328de1900aee5 (patch) | |
tree | 5dc2a18484a5feaa3e30f77dadcb35f5c4945fc5 /gcc/cppexp.c | |
parent | b429d3ee1b1dc11f93cbcac2625e2054afd3be43 (diff) | |
download | gcc-ae2348f67b17faf87574e6c1e60328de1900aee5.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39661 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 11cde7066e1..6aa6d4b4dc3 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)) |