How can one disable gcc warnings inline with c code?

LLeweLLyn Reese
Wed Mar 19 15:56:00 GMT 2003

Ben Davis <> 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


and the -Wsystem-header entry at:


More information about the Gcc-help mailing list