pragma-like warning turn off ?

Ian Lance Taylor iant@google.com
Wed Aug 22 07:47:00 GMT 2007


"Sunzir Deepur" <sunzird@gmail.com> writes:

> On 21 Aug 2007 21:19:07 -0700, Ian Lance Taylor <iant@google.com> wrote:
> > "Sunzir Deepur" <sunzird@gmail.com> writes:
> >
> > > is there a way to turn off warnings for selective lines ?
> >
> > No.
> 
> can you please explain me the complexity of adding this feature ?
> if you'd to add it, how would you do that ?

It's fairly difficult.  You want a way to turn off specific warnings
for specific parts of the IR.  The IR is combined and rearranged
during optimization, so you need to figure out how to make the warning
control track those changes.

There was some recent discussion of this on the gcc-patches mailing
list.  Look for __nowarn__.

Ian



More information about the Gcc mailing list