[Bug c++/49165] [4.3/4.4/4.5/4.6/4.7 Regression] ICE on for-loop/throw combination

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 25 20:30:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49165

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-25 20:04:47 UTC ---
Yes, that's right.  5.16/2:

If either the second or the third operand has type (possibly cv-qualified)
void, then the lvalue-to-rvalue (4.1), array-to-pointer (4.2), and
function-to-pointer (4.3) standard conversions are performed on the second and
third operands, and one of the following shall hold:
— The second or the third operand (but not both) is a throw-expression (15.1);
the result is of the type of the other and is a prvalue.
— Both the second and the third operands have type void; the result is of type
void and is a prvalue. [ Note: This includes the case where both operands are
throw-expressions. — end note ]



More information about the Gcc-bugs mailing list