[cfe-dev] How to get expressions hiding in types?

Chris Lattner clattner at apple.com
Sat Apr 18 22:05:17 PDT 2009


On Apr 18, 2009, at 9:57 PM, Eli Friedman wrote:

> On Sat, Apr 18, 2009 at 4:10 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>> How do I find expressions hiding in the vla sizes of types?  I see
>> that the stmt dumper doesn't walk into them with child iterators  
>> either.
>>
>> I need this to implement checks for these cases:
>> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090413/015827.html
>
> The problem isn't limited to VLAs... consider something like
> "L:;static int a[1 || ({goto L; 0})];".

Ok, what even happens to that expression?  Do we just drop it on the  
floor?

> Perhaps we should just make gotos in statement expressions illegal, at
> least for the moment?

That's fine with me, but it doesn't directly help here: I still need  
some way to diagnose that a label was declared in the stmt expression.

-Chris



More information about the cfe-dev mailing list