aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/parser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index cb2346a..05151cd 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -3632,6 +3632,10 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser,
{
/* Grab the nested-name-specifier and continue the loop. */
cp_parser_pre_parsed_nested_name_specifier (parser);
+ if (is_declaration
+ && TREE_CODE (parser->scope) == TYPENAME_TYPE)
+ parser->scope = resolve_typename_type (parser->scope,
+ /*only_current_p=*/false);
success = true;
continue;
}