[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gl_WARN_ADD does not work with -Wno-xxxx warnings

From: Eric Blake
Subject: Re: gl_WARN_ADD does not work with -Wno-xxxx warnings
Date: Wed, 14 Aug 2013 06:29:14 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

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, and it's been on my list of things
to look into; it shouldn't hurt to check only for the positive form of a

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]