Andrew Pinski 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.
Maybe this will be better if all warnings only come from the front-end.
Or, for the time being, if you apply the options to warnings that only
come from the front end. For the one originally mentioned in the
discussion, this is the case.
If in 4.3 Manuel will have associated this warning to a command-line
option, the "GCC diagnostic" pragma could be used to turn the warning off.
Paolo