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