Desire gcc option to skip warnings in standard headers

Nathan Myers ncm@cygnus.com
Wed Jul 1 20:15:00 GMT 1998


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



More information about the Gcc mailing list