projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93f978b
)
add comment
author
Jason Merrill
<jason@gcc.gnu.org>
Sat, 4 Mar 2006 01:29:35 +0000
(20:29 -0500)
committer
Jason Merrill
<jason@gcc.gnu.org>
Sat, 4 Mar 2006 01:29:35 +0000
(20:29 -0500)
From-SVN: r111701
gcc/cp/except.c
patch
|
blob
|
history
diff --git
a/gcc/cp/except.c
b/gcc/cp/except.c
index 87e958676fa15b07640ea9cff7c3664f0510b9e2..d82c07ff3292beffb7da4da8db3d4ae378baf075 100644
(file)
--- 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));