Dealing with compilers that pretend to be GCC
Ludovic Courtès
ludovic.courtes@inria.fr
Mon Jan 30 18:05:00 GMT 2012
Hello,
Chris Lattner <clattner@apple.com> skribis:
> On Jan 20, 2012, at 5:24 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
>> On 21 January 2012 00:32, Vincent Lefevre wrote:
>>> On 2012-01-20 23:28:07 +0000, Jonathan Wakely wrote:
>>>> May I politely suggest that this is the wrong place to complain about
>>>> other compilers pretending to be GCC :)
>>>
>>> I think that's the fault of GCC, which should have defined a macro
>>> for each extension.
>>
>> And what about the fact other compilers haven't defined such a macro
>> for each extension they implement, whether it comes from GCC or not,
>> is that GCC's fault too?
>
> If fact, some do:
> http://clang.llvm.org/docs/LanguageExtensions.html#feature_check
That seems like a very useful approach to solve the problem.
The docs say that â__has_builtinâ & co. are macros. What do they expand to?
Thanks,
Ludoâ.
More information about the Gcc
mailing list