aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2006-03-03 20:29:35 -0500
committerJason Merrill <jason@gcc.gnu.org>2006-03-03 20:29:35 -0500
commit8a48be3a16675308704e80694f6a600b7ad2ead9 (patch)
tree19afd1469fbf90038e799133791341c3bcceb754 /gcc
parent93f978b755d593ebe594c0529884418b3b69f49f (diff)
downloadgcc-8a48be3a16675308704e80694f6a600b7ad2ead9.zip
gcc-8a48be3a16675308704e80694f6a600b7ad2ead9.tar.gz
gcc-8a48be3a16675308704e80694f6a600b7ad2ead9.tar.bz2
add comment
From-SVN: r111701
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/except.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 87e9586..d82c07f 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -724,7 +724,11 @@ build_throw (tree exp)
temp_expr = NULL_TREE;
stabilize_init (exp, &temp_expr);
+ /* Wrap the initialization in a CLEANUP_POINT_EXPR so that cleanups
+ for temporaries within the initialization are run before the one
+ for the exception object, preserving LIFO order. */
exp = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (exp), exp);
+
if (elided)
exp = build2 (TRY_CATCH_EXPR, void_type_node, exp,
do_free_exception (ptr));