Commit bd16f8f1 by Jason Merrill

tweak comment

From-SVN: r100088
parent a9563c96
...@@ -697,15 +697,18 @@ build_throw (tree exp) ...@@ -697,15 +697,18 @@ build_throw (tree exp)
the space first we would have to deal with cleaning it up if the space first we would have to deal with cleaning it up if
evaluating this expression throws. evaluating this expression throws.
The case where EXP the initializer is a call to a constructor or a The case where EXP the initializer is a cast or a function
function returning a class is a bit of a grey area in the returning a class is a bit of a grey area in the standard; it's
standard; it's unclear whether or not it should be allowed to unclear whether or not it should be allowed to throw. We used to
throw. We used to say no, as that allowed us to optimize this say no, as that allowed us to optimize this case without worrying
case without worrying about deallocating the exception object if about deallocating the exception object if it does. But that
it does. But that conflicted with expectations (PR 13944) and the conflicted with expectations (PR 13944) and the EDG compiler; now
EDG compiler; now we wrap the initialization in a TRY_CATCH_EXPR we wrap the initialization in a TRY_CATCH_EXPR to call
to call do_free_exception rather than in a MUST_NOT_THROW_EXPR, do_free_exception rather than in a MUST_NOT_THROW_EXPR, for this
for this case only. case only.
BUT: Issue 475 may do away with this inconsistency by removing the
terminate() in this situation.
Note that we don't check the return value from stabilize_init Note that we don't check the return value from stabilize_init
because it will only return false in cases where elided is true, because it will only return false in cases where elided is true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment