This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: any way to disable a single *instance* of a GCC warning?
- From: Brian Dessent <brian at dessent dot net>
- To: Rainer Gerhards <rgerhards at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 23 Jun 2008 01:50:48 -0700
- Subject: Re: any way to disable a single *instance* of a GCC warning?
- References: <dc67eef70806230126g268a9973o6bd58b738e6b46bc@mail.gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Rainer Gerhards wrote:
> I wonder if there is any way to disable a warning for the next line. I
> have seen that some compilers do this via a #pragma, but I have not
> found any such pragma in GCC.
gcc has supported this from 4.2 on:
<http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html>
Brian