------- Comment #3 from rguenth at gcc dot gnu dot org 2005-10-19 09:52 ------- Of course we _can_ fix this in the middle-end, simply by allowing COND_EXPRs that satisfy the needs of C++
/* [expr.cond] One of the following shall hold: --The second or the third operand (but not both) is a throw-expression (_except.throw_); the result is of the type of the other and is an rvalue. --Both the second and the third operands have type void; the result is of type void and is an rvalue. We must avoid calling force_rvalue for expressions of type "void" because it will complain that their value is being used. */ but I expect more fallout than only in invert_truthvalue. Maybe the C++ frontend can emit something like !(value?true:(throw,bool())) in these cases. CC'ing Mark. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmitchel at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24439