diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index feeafce..4656b4f 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -22771,7 +22771,10 @@ cp_parser_class_head (cp_parser* parser, /* If the class was unnamed, create a dummy name. */ if (!id) id = make_anon_name (); - type = xref_tag (class_key, id, /*tag_scope=*/ts_current, + tag_scope tag_scope = (parser->in_type_id_in_expr_p + ? ts_within_enclosing_non_class + : ts_current); + type = xref_tag (class_key, id, tag_scope, parser->num_template_parameter_lists); } |