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: Local disable of specific warnings for a section of code


Lee Rhodes wrote:
> Re: GCC 3.4.4 Lang: C,C++
>
> In general I like have all warnings active, however, I have certain sections
> of code where I know a warning will be generated, but I don't want these
> warnings to clutter my build output.  Is there a solution for this?
>   

This is just my 2 cents (pesos, yen whatever), but most GCC warnings are
sensible.  Maybe it's best to clean up the code in question instead of
trying to ignore the warnings?

Failing that, why not just factor your code so the dodgy bits are in
their own C file which you can then change the CFLAGS for. 

Tom


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