summaryrefslogtreecommitdiffstats
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 0ef6e82795b..2dbdbd3b91f 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -558,17 +558,14 @@ expand_start_catch_block (declspecs, declarator)
{
tree decl;
- if (processing_template_decl)
+ if (building_stmt_tree ())
{
if (declspecs)
{
decl = grokdeclarator (declarator, declspecs, CATCHPARM,
1, NULL_TREE);
pushdecl (decl);
- decl = build_min_nt (DECL_STMT, copy_to_permanent (declarator),
- copy_to_permanent (declspecs),
- NULL_TREE);
- add_tree (decl);
+ add_decl_stmt (decl);
}
return;
}
@@ -579,7 +576,6 @@ expand_start_catch_block (declspecs, declarator)
process_start_catch_block (declspecs, declarator);
}
-
/* This function performs the expand_start_catch_block functionality for
exceptions implemented in the new style. __throw determines whether
a handler needs to be called or not, so the handler itself has to do
OpenPOWER on IntegriCloud