]> git.ipfire.org Git - thirdparty/gcc.git/commit
cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
authorMark Mitchell <mmitchell@usa.net>
Sun, 26 Apr 1998 16:30:11 +0000 (16:30 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 26 Apr 1998 16:30:11 +0000 (16:30 +0000)
commit6757edfe655f9b21cdd1dbaddd80b8c5ddc63823
tree81d5ea7e7ca626cf4ade65df9c83bc0fd7422bf2
parent7bf407413f0d6b36bd1a799fea2d5863465dafed
cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.

* 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.

From-SVN: r19418
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]