re PR c++/4403 (incorrect class becomes a friend in template)
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Mon, 14 Mar 2005 14:51:25 +0000 (14:51 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Mon, 14 Mar 2005 14:51:25 +0000 (14:51 +0000)
commit5a24482e72fb06ef2e93050cdb056002f99bb226
treeebe96dca1d08f5e123696a21d05cb1a03baaae0f
parent184107932d56261a7786e3086212cfa32db6acd0
re PR c++/4403 (incorrect class becomes a friend in template)

PR c++/4403
PR c++/9783, DR433
* name-lookup.c (pushtag): Skip template parameter scope when
scope is ts_global.  Don't push tag into template parameter
scope.
* pt.c (instantiate_class_template): Reorder friend class
template substitution to handle non-dependent friend class
that hasn't been previously declared.

* g++.dg/template/friend34.C: New test.
* g++.dg/template/friend35.C: Likewise.
* g++.old-deja/g++.pt/inherit2.C: Remove XFAIL's.

From-SVN: r96432
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/friend34.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/friend35.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/inherit2.C