Re: Warning Supression Doesn't Work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lex Fridman <lexfridman@xxxxxxxxx> writes:

> What I've tried is to put one of the following in foo.cpp:
> #pragma GCC diagnostic ignored -Wunused
> #pragma GCC diagnostic warning -Wunused
> #pragma GCC diagnostic ignored "-Wunused"
> #pragma GCC diagnostic warning "-Wunused"

The last two are the right syntax.

> Do I need to have a later version of gcc than 4.1.3 for it to work? GCC
> simply says warning: ignoring #pragma GCC diagnostic

Yes, the feature is only available in gcc 4.2 and later.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux