Disabling warnings from within the source

Andre Majorel amajorel@teaser.fr
Fri Jul 4 16:04:00 GMT 2003


Is there a way to disable a class of warnings from within the
source, through a pragma or some magical __keyword__ ? Bonus
points if it can be done for just part of a translation unit.

I'm looking for a notional equivalent of this :

/* some code */

#ifdef GCC
__nowarn_begin__ (no-char-subscripts)
#endif

/* some code that purposedly uses chars as subscripts */

#ifdef GCC
__nowarn_end__
#endif

/* some code */

-- 
André Majorel <amajorel@teaser.fr>
http://www.teaser.fr/~amajorel/



More information about the Gcc mailing list