------- Comment #3 from redi at gcc dot gnu dot org  2010-04-29 13:31 -------
See [expr.cond]p2
if one operand is a throw-expression the result of the conditional-expression
is an rvalue of the type of the other operand (i.e. int)

I think it's actually a bug that this compiles:
int* f(bool b) { return b ? 0 : 0; }

Again, the result of the conditional expression is an rvalue of type int, it is
not a null pointer constant


-- 


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

Reply via email to