]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/6695 (Regression: template friend declaration doesn't work)
authorMark Mitchell <mark@codesourcery.com>
Thu, 27 Jun 2002 21:48:01 +0000 (21:48 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 27 Jun 2002 21:48:01 +0000 (21:48 +0000)
PR c++/6695
* pt.c (tsubst_friend_class): Substitute into the context of the
friend before using it.

PR c++/6695
* g++.dg/template/friend7.C: New file.

From-SVN: r55043

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog

index c7f7ab5300fc71ab0de9fbc29b52d1747128eeac..68fa15549bf05264a0b0bad3ffb6d006f98aa987 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-27  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/6695
+       * pt.c (tsubst_friend_class): Substitute into the context of the
+       friend before using it.
+
 2002-06-23  Matt Thomas  <matt@3am-software.com>
 
        * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
index c592b8658d7cf085d650680572d0cf8b22d45624..ed0a16256fc07d554ac571fa4eb421ac7fe87c47 100644 (file)
@@ -4811,7 +4811,7 @@ tsubst_friend_class (friend_tmpl, args)
       if (TREE_CODE (context) == NAMESPACE_DECL)
        push_nested_namespace (context);
       else
-       push_nested_class (context, 2);
+       push_nested_class (tsubst (context, args, tf_none, NULL_TREE), 2);
     }
 
   /* First, we look for a class template.  */
index 0c0f8acae187db2bb8431ce0f2a9de4cac7566cc..cfb85cbcee66d5ce0dcc414b9311454149eb7568 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-27  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/6695
+       * g++.dg/template/friend7.C: New file.
+
 2002-06-23  Andreas Jaeger  <aj@suse.de>
 
        * gcc.c-torture/execute/complex-6.c: New.