This is the mail archive of the
mailing list for the GCC project.
Re: [patch] New flag -Wsystem-headers
- To: Branko Čibej <branko dot cibej at hermes dot si>
- Subject: Re: [patch] New flag -Wsystem-headers
- From: Neil Booth <NeilB at earthling dot net>
- Date: Mon, 11 Sep 2000 19:31:08 +0100
- Cc: gcc-patches at gcc dot gnu dot org, Zack Weinberg <zack at wolery dot cumb dot org>
- References: <39BBC57F.DCBD341@hermes.si>
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.
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.