diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index f5bb0c1beb4..ea403987b23 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1355,7 +1355,14 @@ begin_compound_stmt (unsigned int flags) keep_next_level (false); } else - r = do_pushlevel (flags & BCS_TRY_BLOCK ? sk_try : sk_block); + { + scope_kind sk = sk_block; + if (flags & BCS_TRY_BLOCK) + sk = sk_try; + else if (flags & BCS_TRANSACTION) + sk = sk_transaction; + r = do_pushlevel (sk); + } /* When processing a template, we need to remember where the braces were, so that we can set up identical scopes when instantiating the template |