This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24439] [3.4/4.0/4.1 Regression] ICE with invert conditional containing throw
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2005 09:52:58 -0000
- Subject: [Bug c++/24439] [3.4/4.0/4.1 Regression] ICE with invert conditional containing throw
- References: <bug-24439-4066@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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