bug-gnulib
[Top][All Lists]
Advanced

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

Re: __GNUC_PREREQ


From: Eric Blake
Subject: Re: __GNUC_PREREQ
Date: Fri, 29 Jan 2010 06:04:04 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

According to Bruno Haible on 1/28/2010 7:52 AM:
> Eric Blake wrote:
>> For that matter, would it make sense to have a gnulib module that
>> guarantees that __GNUC_PREREQ is defined in <config.h>, and then convert
>> various other modules to use it rather than open-coding their __GNUC__
>> version checks?
> 
> I don't think it's worth it:
>   - You would be replacing a well understandable one-liner with another
>     understandable one-liner. No win in terms of maintainability.

#if __GNUC_PREREQ(3,4)

is shorter than:

#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)

but point taken, it isn't worth the effort of the extra indirection
through another module.  So even though this idea had some merit, I'm
dropping any work on a patch in this direction.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]