From ae2348f67b17faf87574e6c1e60328de1900aee5 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 14 Feb 2001 07:38:20 +0000 Subject: * 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 --- gcc/cppexp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/cppexp.c') 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)) -- cgit v1.2.1