This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] Silence some warnings [was Re: "introduce no new bootstrap..."]


 > From: Neil Booth <neil@daikokuya.demon.co.uk>
 > 
 > Anyway, how does this float people's boat?  It will help silence
 > gazillions of warnings caused by glibc in recent Linux bootstraps.

Thanks Neil, consider my boat floating. :-)


 > I'll post a testcase soon.  Bootstrapping i586 Linux.  OK to commit
 > this in the slush period?
 > Neil.

One nit I noticed is that you handled the integer 'U' suffix but not
the floating point 'L' or 'F' ones, which could arise in e.g. a
FLT_MAX macro.  IMHO, you should handle these too.

When this goes in, I'll update the -Wtraditional suffix comment in
invoke.texi explaining that _MIN/_MAX no longer cause spurious
warnings. :-)

For testcases, look at gcc.dg/wtr-suffix-1.c and
gcc.dg/cpp/tr-warn2.c, you can copy those as a starting point for the
-Wtraditional warnings you've fixed.  (Call them wtr-suffix-2.c and
tr-warn7.c.)  I don't know offhand where the c99 varargs stuff is
currently tested.  Jsm might.

		Thanks,
		--Kaveh


 > 	* 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.

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]