[cfe-dev] Better type-specifier representation

Argiris Kirtzidis akyrtzi at gmail.com
Fri Sep 12 17:12:20 PDT 2008


Ted Kremenek wrote:
>
> On Sep 12, 2008, at 4:44 PM, Argiris Kirtzidis wrote:
>
>> Ted Kremenek wrote:
>>>
>>> The one outstanding grossness that I can think of right now is 
>>> VLAs.  How should we represent:
>>>
>>>  int x[foo()][bar()][...], y;
>>>
>>> Right now, the type for the VLA owns the expressions foo(), bar(), 
>>> and so on.  Both DeclGroups and TypeSpecifiers don't solve this 
>>> problem (I believe).
>>>
>>
>> Is this restricted to VLAs ?
>> Doesn't this have the same issue ?:
>>
>> const int x=10;
>> int y[x+1]; // type owning expression "x+1"
>>
>
> Huh.  Does gcc treat 'y' and as a VLA or as a constant-sized array?  I 
> guess gcc's constant folding built into the frontend would make that a 
> constant-sized array.

Ah I should have mentioned that I was considering the above from the 
point of C++, which doesn't have the VLA concept.



More information about the cfe-dev mailing list