* cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Apr 1998 16:30:11 +0000 (16:30 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Apr 1998 16:30:11 +0000 (16:30 +0000)
commit0f0d5a69be58a6d116c07a886a15e08f5e774814
tree81d5ea7e7ca626cf4ade65df9c83bc0fd7422bf2
parent0fc087a4381cf9304de0ea12ba618186708b7c04
* cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
(DECL_CLASS_TEMPLATE_P): Likewise.
(DECL_PRIMARY_TEMPLATE): Likewise.
(PRIMARY_TEMPLATE_P): Use it.
(push_template_decl_real): New function.
(redeclare_class_template): Take new template parameters as
input.
(is_specialization_of): New function.
(comp_template_args): Declare.
* decl.c (pushtag): Handle friend template classes.
(xref_tag): Likewise.  Use new calling convention for
redeclare_class_template.
* decl2.c (grok_x_components): Handle friend templates.
* friend.c (is_friend): Use is_specialization_of where
appropriate.  Deal with friend class templates.
(make_friend_class): Let a class template be friends with itself.
* pt.c (comp_template_args): Remove declaration.
(tsubst_friend_class): New function.
(push_template_decl_real): New function.
(push_template_decl): Use it.
(redeclare_class_template): Adjust for new calling convention.
(comp_template_args): Give it external linkage.
(instantiate_class_type): Use tsubst_friend_class to deal
with friend templates.
* typeck.c (comptypes): Use comp_template_args, rather than
expanding it inline.
* parse.y (component_decl): Handle a nested template type
like other component type declarations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19418 138bc75d-0d04-0410-961f-82ee72b054a4
15 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/friend.c
gcc/cp/parse.c
gcc/cp/parse.y
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/g++.old-deja/g++.pt/friend14.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend15.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend16.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend17.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend18.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend19.C [new file with mode: 0644]