[libvirt] [PATCH] build: allow building with newer glibc-headers and -O0

Eric Blake eblake at redhat.com
Thu Jun 7 12:25:40 UTC 2012


On 06/07/2012 05:24 AM, Christophe Fergeau wrote:

Hello, and thanks for reviewing this.

> 
> This is not causing an actual issue while compiling libvirt, but
> __OPTIMIZE__ is not defined when using -O0, which causes a warning
> with -Wundef

Libvirt explicitly refuses to use -Wundef (see
m4/virt-compile-warnings.m4), since C99 guarantees that you can sanely
use an undefined macro as 0 in preprocessor evaluation.

> 
> Using a #ifdef would be more correct:

Only if you care about -Wundef, which we don't.  But I agree that if
other projects are copying this trick to work around glibc's braindead
choice of making this warning verbose, then those projects may have to
consider this fact.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120607/97b36d51/attachment-0001.sig>


More information about the libvir-list mailing list