You are emitting body of the case statement when no enclosing switch is found. 
Is this intended behavior (gcc compatible behavior)?
If so, patch LGTM.

- Thanks, Fariborz

On Jan 15, 2012, at 6:24 PM, Aaron Ballman wrote:

> On Sun, Jan 15, 2012 at 6:04 PM, David Blaikie <[email protected]> wrote:
>> Test case would be nice - and, naively: is there any reason this
>> wouldn't be fixed up by the constant-folding code? (perhaps it's
>> better the way you've fixed it, but I am curious - leaving cases
>> without switches around when constant folding seems a bit suspect/odd)
> 
> Now, with test case.  As for whether this could be fixed up in the
> constant folding code: I didn't see a particularly clean way to do it
> aside from this.  But I'm all ears if someone has a suggestion!
> 
> ~Aaron
> <switch_folding.patch>_______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to