On 21/01/07, Andrew Pinski <[EMAIL PROTECTED]> wrote:
On Sun, 2007-01-21 at 01:49 -0500, Richard Stallman wrote:
> It would be nice to have such a construct in GNU C, something that
> could be used in a macro expansion, and would turn off _all_ warnings
> for the code within the construct.

http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html

But it says:
Also, while it is syntactically valid to put these pragmas anywhere in
your sources, the only supported location for them is before any data or
functions are defined. Doing otherwise may result in unpredictable
results depending on how the optimizer manages your sources.


"Note that this implementation is simplistic.  It requires the user
take care to place the pragmas before anything that might generate the
related warnings.  The syntax, however, allows for the diagnostic
machinery to, in the future, keep track of the state of the diagnostic
flags for each line and manage the diagnostics based on the reported
line number."

http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00922.html

So, it just needs some more work. Is somebody working on this? Perhaps
we could add it to the list of Summer of Code projects for this year.

Also, when was this introduced? I cannot find any reference in the
list of changes of GCC 4.2 or GCC 4.3.

http://gcc.gnu.org/gcc-4.2/changes.html
http://gcc.gnu.org/gcc-4.3/changes.html

Cheers,

Manuel.

Reply via email to