This is the mail archive of the gcc-patches@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: [patch] New flag -Wsystem-headers


Branko Čibej wrote:-

> I also looked if I could add this flag to tradcpp, but I see no easy way to
> check if we're truly parsing a system header. If someone (Zack?) knows how
> to do that, I can make a patch for tradcpp.c.

> 	* cpplib.h (cpp_options): New member warn_system_headers.
> 	* cpperror.c (_cpp_begin_message): Test warn_system_headers.
> 	* cppinit.c (handle_option): Recognize -Wsystem-headers.
> 	(print_help): Describe -Wsystem-headers.

Hi Branko,

Could you also update the various places in cpplib where the check for
system headers is made in the main code?  We'd just be duplicating
checks otherwise, and possibly not emitting warnings in system headers
even if they were requested.

Neil.

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