[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gl_WARN_ADD does not work with -Wno-xxxx warnings
From: |
Christophe Fergeau |
Subject: |
Re: gl_WARN_ADD does not work with -Wno-xxxx warnings |
Date: |
Wed, 14 Aug 2013 16:07:55 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Aug 14, 2013 at 06:29:14AM -0600, Eric Blake wrote:
> On 08/14/2013 01:58 AM, Christophe Fergeau wrote:
> > Hi,
> >
> > gcc handling of -Wno-xxxx flags is different from its handling of -Wxxxx
> > flags as described in
> > http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Warning-Options.html#Warning-Options
> > :
> >
> > "When an unrecognized warning option is requested (e.g.,
> > -Wunknown-warning), GCC emits a diagnostic stating that the option is not
> > recognized. However, if the -Wno- form is used, the behavior is slightly
> > different: no diagnostic is produced for -Wno-unknown-warning unless other
> > diagnostics are being produced."
> >
> > This means that with gcc, gl_WARN_ADD([-Wno-unknown-warning]) will always
> > succeed, leading to issues like
> > http://www.redhat.com/archives/libvir-list/2012-April/msg00000.html
> >
> > I guess that when gl_WARN_ADD is used with -Wno-unknown-warning, it should
> > test as well the corresponding -Wunknown-warning flag, though I don't know
> > how well this will work with non-gcc compilers.
>
> Yes, this has been brought up before
Ah, that's cool then, I was not sure this was a known issue, so just wanted
to report it. Thanks!
Christophe
pgp2Ezbb0Sxca.pgp
Description: PGP signature
- gl_WARN_ADD does not work with -Wno-xxxx warnings, Christophe Fergeau, 2013/08/14
- Re: gl_WARN_ADD does not work with -Wno-xxxx warnings, Eric Blake, 2013/08/14
- Re: gl_WARN_ADD does not work with -Wno-xxxx warnings,
Christophe Fergeau <=
- [PATCH] warnings: check -Wfoo rather than -Wno-foo, Eric Blake, 2013/08/14
- Re: [PATCH] warnings: check -Wfoo rather than -Wno-foo, Paul Eggert, 2013/08/14
- Re: [PATCH] warnings: check -Wfoo rather than -Wno-foo, Eric Blake, 2013/08/15
- [PATCH] warnings: extend -Wno-foo handling to work through shell vars, Eric Blake, 2013/08/15
- Re: [PATCH] warnings: extend -Wno-foo handling to work through shell vars, Eric Blake, 2013/08/15
- Re: [PATCH] warnings: extend -Wno-foo handling to work through shell vars, Paul Eggert, 2013/08/15
- Re: [PATCH] warnings: extend -Wno-foo handling to work through shell vars, Eric Blake, 2013/08/15
- Re: [PATCH] warnings: check -Wfoo rather than -Wno-foo, Christophe Fergeau, 2013/08/19