This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Disabling warnings from within the source
- From: Andre Majorel <amajorel at teaser dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 4 Jul 2003 17:56:31 +0200
- Subject: 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/