From: Mark Mitchell Date: Thu, 27 Jun 2002 21:48:01 +0000 (+0000) Subject: re PR c++/6695 (Regression: template friend declaration doesn't work) X-Git-Tag: releases/gcc-3.1.1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b3883dccb4ffcba0a4eaf991f7465ba3a5b6b61;p=thirdparty%2Fgcc.git re PR c++/6695 (Regression: template friend declaration doesn't work) 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c7f7ab5300fc..68fa15549bf0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-06-27 Mark Mitchell + + PR c++/6695 + * pt.c (tsubst_friend_class): Substitute into the context of the + friend before using it. + 2002-06-23 Matt Thomas * decl.c (finish_function): Change "#ifdef VMS_TARGET" to diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c592b8658d7c..ed0a16256fc0 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0c0f8acae187..cfb85cbcee66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-06-27 Mark Mitchell + + PR c++/6695 + * g++.dg/template/friend7.C: New file. + 2002-06-23 Andreas Jaeger * gcc.c-torture/execute/complex-6.c: New.