This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: How can one disable gcc warnings inline with c code?


Ben Davis <bnd25 at cam dot ac dot uk> writes:

> On Wednesday 19 March 2003 3:16 pm, Jamie Risk wrote:
> > A few system libraries are giving me grief by causing numerous warnings in
> > otherwise 'clean' or warning free code.  Without disabling the warning
> > checking at the command line is there a way to disable the warnings inline?
> 
> Have you tried -Wno-system-headers?

-Wno-system-headers is the default. However, gcc needs some way to
    determine if a header is a system header. That way is:

    #pragma GCC system_header

See:

http://gcc.gnu.org/onlinedocs/gcc-3.2.2/cpp/System-Headers.html#System%20Headers

and the -Wsystem-header entry at:

http://gcc.gnu.org/onlinedocs/gcc-3.2.2/gcc/Warning-Options.html#Warning%20Options

    


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