[cfe-dev] Bug in __extension__ handling for record fields

Abramo Bagnara abramobagnara at tin.it
Mon Aug 17 16:33:28 PDT 2009


Abramo Bagnara ha scritto:
> Chris Lattner ha scritto:
>> On Aug 13, 2009, at 2:53 AM, Abramo Bagnara wrote:
>>
>>> This log shows the problem:
>>>
>>> $ cat q.c
>>>
>>> struct {
>>>  __extension__ unsigned long long b;
>>> } a;
>>> $ ~/llvm/Debug/bin/clang-cc -pedantic -std=c89 q.c
>>> q.c:3:31: warning: 'long long' is an extension when C99 mode is not
>>> enabled
>>>  __extension__ unsigned long long b;
>>>                              ^
>>> 1 diagnostic generated.
>> This sounds like a reasonable approach to me!
> 
> I've attached the patch.
> 
> I've preferred to put the flag in Declarator to have it available for a
> wider range of Declaration.
> 
> Once this patch is commited (and if you agree) I'd like to submit a
> further patch to map the saved extension flag in an appropriate
> attribute to save this info in the AST (there is a FIXME somewhere in
> clang stating this needs).

Everything is ok with the sent patch?



More information about the cfe-dev mailing list