Re: [RFC] PR C++/51225

2011-11-23 Thread Paolo Carlini
Hi again, Thus, what to do? Definitely adding CAST_EXPR to the switch works, but I'm wondering if we could do something else... but doesn't seem easy to me given the above. For example, I suppose changing potential_constant_expression to return true for error_mark_node would be catastrophic, e

[RFC] PR C++/51225

2011-11-23 Thread Paolo Carlini
Hi, today I have been analyzing this issue - not terribly urgent, it's a regression but the ICE is on *invalid*. It happens only in C++11 mode and the test is the following, very simple: template struct A {}; template void foo() { A a; } This is what happens. First we build anyway a