diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 7d04971..3d35877 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -14891,7 +14891,7 @@ cp_parser_using_declaration (cp_parser* parser, static tree cp_parser_alias_declaration (cp_parser* parser) { - tree id, type, decl, dummy, attributes; + tree id, type, decl, pushed_scope = NULL_TREE, attributes; location_t id_location; cp_declarator *declarator; cp_decl_specifier_seq decl_specs; @@ -14925,12 +14925,15 @@ cp_parser_alias_declaration (cp_parser* parser) NULL_TREE, attributes); else decl = start_decl (declarator, &decl_specs, 0, - attributes, NULL_TREE, &dummy); + attributes, NULL_TREE, &pushed_scope); if (decl == error_mark_node) return decl; cp_finish_decl (decl, NULL_TREE, 0, NULL_TREE, 0); + if (pushed_scope) + pop_scope (pushed_scope); + /* If decl is a template, return its TEMPLATE_DECL so that it gets added into the symbol table; otherwise, return the TYPE_DECL. */ if (DECL_LANG_SPECIFIC (decl) |