Re: Suppressing particular warnings for particular lines of code

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

 



Yang Zhang wrote:

> > There are no #pragma directives to disable warnings in-line with the code.
> 
> I sense an itch here - write a grep-like tool that can filter out
> warnings from gcc based on the presence of certain tokens in your source
> file.  For instance, inserting

>From 4.2 and on gcc does support a form of #pragma control of
diagnostics, see
<http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html>.  However it
doesn't work the way you probably want, in that the setting is for the
whole file, not per-function.  I think per-function support was in fact
part of the original plan but I don't know that anyone is currently
working on it.

Brian

[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