This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dealing with compilers that pretend to be GCC


Hi,

Chris Lattner <clattner@apple.com> skribis:

> On Jan 30, 2012, at 7:56 AM, Ludovic CourtÃs wrote:
>
>> 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?  
>
> 0 or 1.

I understand.  To put it another way, how are they defined?

Thanks,
Ludoâ.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]