bug-autoconf
[Top][All Lists]
Advanced

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

Re: uses old-style function definition, thus fails with -Werror=old-styl


From: Eric Blake
Subject: Re: uses old-style function definition, thus fails with -Werror=old-style-definition
Date: Fri, 03 Jan 2014 14:56:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/03/2014 02:51 PM, Vincent Lefevre wrote:
> A developer may want to test his software with
> -Werror=old-style-definition (in particular because such definitions
> could be a real bug in the software). But configure fails because
> autoconf (version 2.69) generates such a function definition.

Read the list archives.  We have repeatedly said that anyone running
./configure CFLAGS=-Werror is asking for problems, because we CANNOT
guarantee warning-free compilation across all versions of all compilers.
 The only SANE way to use -Werror in configure is to probe whether it
exists, and then add it to a secondary make variable that you then
append to your source files (where it does make sense), while still
leaving CFLAGS untainted so that configure doesn't trip over (sometimes
intentional) warnings.

The bug is not in autoconf, but in your programs for polluting CFLAGS.

That said, if someone has the time and inclination to write a patch that
would make autoconf automatically strip out -Werror* arguments from
CFLAGS for the duration of the configure testing, then add it back in at
the end, be my guest.

-- 
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]