This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Can I disable the "-Werror" compile flag for some code blocks?
On Mon, 2005-08-29 at 01:18 -0700, Ian Lance Taylor wrote:
> Jules Colding <colding@omesc.com> writes:
>
> > I would like to use "-Werror" when compiling to make sure that I catch
> > all warnings.
> >
> > The problem is that I need to include a few ORBit2 implementation
> > skeleton files in my source. Some impl_foo__create() functions for
> > interfaces declared in the IDL file, but not used in the code, give rise
> > to "defined but not used" warnings.
> >
> > I would like to disable "-Werror" for these specific functions/code
> > blocks if possible. Can I do that with gcc?
>
> You can't turn off -Werror for specific functions or blocks by code
> (although there is some work being done toward implementing that in
> some future release). But you can compile specific files with
> -Wno-warn-unused-function.
Thanks,
jules