This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Desire gcc option to skip warnings in standard headers
- To: egcs at cygnus dot com
- Subject: Re: Desire gcc option to skip warnings in standard headers
- From: Nathan Myers <ncm at cygnus dot com>
- Date: Wed, 01 Jul 1998 14:57:12 -0700
- Newsgroups: cygnus.egcs
- Organization: http://www.cantrip.org/
- References: <9806261352.AA18188.cygnus.egcs@ipl.rpi.edu>
Frederick W. Wheeler wrote:
>
> It would be very convenient for me to have a gcc command-line option
> or #pragma to prevent the printing of warnings in the standard
> headers. Warnings could begin to be issued at the first line that is
> not #include <something.h>. It seems to me that this would be
> relatively easy to implement.
Note that not all warnings are undesirable even from very bad headers.
In particular, a warning that a macro is being redefined helps protect
you when non-system-header code defines a macro that is (re)defined in
a system header. System headers don't tend to do this to themselves,
so emitting the warning anyway would usually be a Good Thing.
Nathan Myers
ncm@cantrip.org