This is the mail archive of the
mailing list for the GCC project.
Re: Dealing with compilers that pretend to be GCC
On Jan 31, 2012, at 4:58 AM, Marc Glisse wrote:
>>>> The docs say that ‘__has_builtin’ & co. are macros. What do they expand to?
>>> 0 or 1.
>> I understand. To put it another way, how are they defined?
> Compiler magic, like __LINE__ for instance? I am still not sure what you are asking...
Yes, they are compiler magic. __has_attribute() __has_extension() etc all work the same way as well.
> Interestingly enough:
> $ cat q.c
> $ clang -E q.c
Nice catch, fixed in r149397. Thanks!