diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 260053b..6f23465 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10378,6 +10378,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) if (TYPE_LANG_SPECIFIC (type)) TYPE_WAS_ANONYMOUS (type) = 1; + /* If this is a typedef within a template class, the nested + type is a (non-primary) template. The name for the + template needs updating as well. */ + if (TYPE_LANG_SPECIFIC (type) && CLASSTYPE_TEMPLATE_INFO (type)) + DECL_NAME (CLASSTYPE_TI_TEMPLATE (type)) + = TYPE_IDENTIFIER (type); + /* XXX Temporarily set the scope. When returning, start_decl expects it as NULL_TREE, and will then then set it using pushdecl. */ |