[cfe-commits] [PATCH] Crash when constant folding switch statements (Bug 11656)
jahanian
fjahanian at apple.com
Mon Jan 16 09:01:09 PST 2012
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 <dblaikie at gmail.com> 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list