bug-autoconf
[Top][All Lists]
Advanced

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

Re: AC_HEADER_STDBOOL fails with clang


From: Paul Eggert
Subject: Re: AC_HEADER_STDBOOL fails with clang
Date: Mon, 23 Aug 2010 09:27:44 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

On 08/23/10 09:14, Eric Blake wrote:
> So does clang define __GNUC__?  That's a lie, if it does not support the
> same extensions as gcc.

Yes, and this lie causes a lot of problems in practice:
clang does not support many extensions that GCC does support.
The usual workaround is to replace "defined __GNUC__" with
"defined __GNUC__ && ! defined __clang__", but this sort of
thing is obviously not The Autoconf Way.  It is better, in
general, to avoid the use of __GNUC__ entirely.  In this
particular case, where the __GNUC__ is gratuitous, I'd remove
the __GNUC__ (while also replacing the -1 with 0 as Eric suggests).



reply via email to

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