summaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-23 23:02:53 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-23 23:02:53 +0000
commita2aca813a3261ed2af2a81d8dcec36ca091c198a (patch)
tree759c405352fb4d74c1af9ce55e7ac917dd80ea6f /gcc/cp/except.c
parente181a5049abffe963582ae7ec423ff87b20ebb1e (diff)
downloadgcc-a2aca813a3261ed2af2a81d8dcec36ca091c198a.tar.gz
tweak comment
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 60db762924e..0133981b680 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -697,15 +697,18 @@ build_throw (tree exp)
the space first we would have to deal with cleaning it up if
evaluating this expression throws.
- The case where EXP the initializer is a call to a constructor or a
- function returning a class is a bit of a grey area in the
- standard; it's unclear whether or not it should be allowed to
- throw. We used to say no, as that allowed us to optimize this
- case without worrying about deallocating the exception object if
- it does. But that conflicted with expectations (PR 13944) and the
- EDG compiler; now we wrap the initialization in a TRY_CATCH_EXPR
- to call do_free_exception rather than in a MUST_NOT_THROW_EXPR,
- for this case only.
+ The case where EXP the initializer is a cast or a function
+ returning a class is a bit of a grey area in the standard; it's
+ unclear whether or not it should be allowed to throw. We used to
+ say no, as that allowed us to optimize this case without worrying
+ about deallocating the exception object if it does. But that
+ conflicted with expectations (PR 13944) and the EDG compiler; now
+ we wrap the initialization in a TRY_CATCH_EXPR to call
+ do_free_exception rather than in a MUST_NOT_THROW_EXPR, for this
+ 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
because it will only return false in cases where elided is true,