* pt.c (push_template_decl_real): Don't remangle the name of a
class template.
From-SVN: r39752
+2001-02-15 Mark Mitchell <mark@codesourcery.com>
+
+ * pt.c (push_template_decl_real): Don't remangle the name of a
+ class template.
+
2001-02-15 Jim Meyering <meyering@lucent.com>
* Make-lang.in (c++.install-common): Depend on installdirs.
{
SET_TYPE_TEMPLATE_INFO (TREE_TYPE (tmpl), info);
if ((!ctx || TREE_CODE (ctx) != FUNCTION_DECL)
- && TREE_CODE (TREE_TYPE (decl)) != ENUMERAL_TYPE)
+ && TREE_CODE (TREE_TYPE (decl)) != ENUMERAL_TYPE
+ /* Don't change the name if we've already set it up. */
+ && !IDENTIFIER_TEMPLATE (DECL_NAME (decl)))
DECL_NAME (decl) = classtype_mangled_name (TREE_TYPE (decl));
}
else if (DECL_LANG_SPECIFIC (decl))
--- /dev/null
+// Build don't link:
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+template <class T>
+class C {
+ template <class U>
+ friend class ::C;
+};
+
+namespace N
+{
+template <class T>
+class D {
+ template <class U>
+ friend class N::D;
+};
+};