
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@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org