On 06/07/2012 06:45 AM, Christophe Fergeau wrote:
On Thu, Jun 07, 2012 at 06:25:40AM -0600, Eric Blake wrote:
> On 06/07/2012 05:24 AM, Christophe Fergeau wrote:
>> 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.
Yes, I've tried reusing this change in other projects (libosinfo) which
also use -Wundef which gave me this warning. I felt it was better to use
the same 'code' in libvirt and these projects, hence this email ;)
But I agree it's not needed in libvirt, I'm fine if thing are kept this
way.
If the argument is that we want to make the autoconf snippet easier to
copy elsewhere, then I don't mind applying a patch that uses:
#if defined __OPTIMIZE__ && __OPTIMIZE__
as the gate in the AH_VERBATIM block of code.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org