aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 8f99bc1f64c..030a04cb009 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -737,12 +737,12 @@ genrtl_asm_stmt (cv_qualifier, string, output_operands,
/* Generate the RTL for a DECL_CLEANUP. */
void
-genrtl_decl_cleanup (decl, cleanup)
- tree decl;
- tree cleanup;
+genrtl_decl_cleanup (t)
+ tree t;
{
+ tree decl = CLEANUP_DECL (t);
if (!decl || (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
- expand_decl_cleanup (decl, cleanup);
+ expand_decl_cleanup_eh (decl, CLEANUP_EXPR (t), CLEANUP_EH_ONLY (t));
}
/* We're about to expand T, a statement. Set up appropriate context
@@ -847,6 +847,10 @@ expand_stmt (t)
genrtl_scope_stmt (t);
break;
+ case CLEANUP_STMT:
+ genrtl_decl_cleanup (t);
+ break;
+
default:
if (lang_expand_stmt)
(*lang_expand_stmt) (t);