This is the mail archive of the gcc@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]

Disabling warnings from within the source


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/


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