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: Desire gcc option to skip warnings in standard headers


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


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