]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/pt.c
re PR c++/13495 (Friendship to class nested within a template is broken)
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Wed, 20 Oct 2004 16:20:50 +0000 (16:20 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Wed, 20 Oct 2004 16:20:50 +0000 (16:20 +0000)
commitb939a02360cf41893436921e319c4283f2d6edb5
tree36d5919ab016d6c55b8dee09fb15a76c348df75e
parent23517e6b4ea01d0af35984f8473a235a29ff93c7
re PR c++/13495 (Friendship to class nested within a template is broken)

PR c++/13495
* decl.c (make_unbound_class_template): Add PARM_LIST parameter.
* cp-tree.h (make_unbound_class_template): Adjust prototype.
* parser.c (cp_parser_lookup_name): Adjust call to
make_unbound_class_template.
(cp_parser_single_declaration): Handle member class of class
template as template friend parsing correctly.
* friend.c (is_friend): Call is_specialization_of_friend for
template friend class.
(make_friend_class): Handle member class of class template as
template friend.
* pt.c (is_specialization_of_friend): Likewise.
(instantiate_class_template): Likewise.
(tsubst): Adjust call to make_unbound_class_template.

* g++.dg/template/memfriend9.C: New test.
* g++.dg/template/memfriend10.C: Likewise.
* g++.dg/template/memfriend11.C: Likewise.
* g++.dg/template/memfriend12.C: Likewise.
* g++.dg/template/memfriend13.C: Likewise.
* g++.dg/template/memfriend14.C: Likewise.
* g++.dg/template/memfriend15.C: Likewise.
* g++.dg/template/memfriend16.C: Likewise.
* g++.dg/template/memfriend17.C: Likewise.
* g++.old-deja/g++.pt/friend44.C: Remove bogus error.

From-SVN: r89335
17 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/friend.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/memfriend10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend14.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend16.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend17.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/memfriend9.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend44.C