[Top][All Lists]

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

Re: extern-inline: be -Wundef safe in config.h

From: Eric Blake
Subject: Re: extern-inline: be -Wundef safe in config.h
Date: Fri, 28 Sep 2012 06:43:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 09/28/2012 01:38 AM, Akim Demaille wrote:
> Le 25 sept. 2012 à 16:06, Eric Blake a écrit :
>> On 09/25/2012 06:27 AM, Akim Demaille wrote:
>>> Recent changes introduce -Wundef warnings in config.h.  The
>>> appended proposal eliminates them.
>>> -#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__
>>> +#if (__GNUC__ \
>> Even though gcc's -Wundef will never warn about __GNUC__ being
>> undefined, it seems like you should also be checking that __GNUC__ is
>> defined for the sake of non-gcc compilers, if we accept this approach.
> Hi Eric,
> there are several places where we have __GNUC__ unprotected,
> and AFAICT, it has never been a problem.  In this case, I
> do have problems in Bison.
> So I don't know if it is worth the trouble.

Concur - we can wait for a report of failure from someone using non-gcc
but where their compiler warns about undefined macros (since C99
guarantees the behavior of undefined macros, and -Wundef really exists
more to cater to K&R compilers, I doubt we will get any such reports).

>> At any rate, while most of gnulib doesn't care about -Wundef, I can
>> agree to the concept of having config.h be -Wundef clean, so I'm okay
>> with this patch if Paul is.
> This has already been agreed,
> http://lists.gnu.org/archive/html/bug-gnulib/2011-11/msg00308.html
> I'm waiting for Paul's opinion here.  Or should I proceed?

Go ahead and push this patch.

Eric Blake   address@hidden    +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]