]> gcc.gnu.org Git - gcc.git/commit - gcc/cp/pt.c
PR c++/7347, c++/7348
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Mon, 22 Jul 2002 14:23:37 +0000 (14:23 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Mon, 22 Jul 2002 14:23:37 +0000 (14:23 +0000)
commit0e902d98aee5f7d4f4ac9baf639d2fad0eaa848e
tree03d4d4ae02f393f6f7171d9364e1ec68a2ced3fd
parent0d541696aa1fce80cf0d521be3e1664391526c28
PR c++/7347, c++/7348

PR c++/7347, c++/7348
* cp-tree.h (tsubst_flags_t): Add tf_parsing.
* decl.c (make_typename_type): Use it.
(make_unbound_class_template): Likewise.
(lookup_name_real): Don't call type_access_control if scope is
template parameter dependent.
* parse.y (template_arg): Call make_unbound_class_template with
tf_parsing set.
(nest_name_specifier): Call make_typename_type with tf_parsing set.
(typename_sub0): Likewise.
(typename_sub1): Likewise.
(instantiate_decl): Push class scope.
* pt.c (regenerate_decl_from_template): Call pushclass and popclass
for both static variable and member function template.
(instantiate_decl) Call pushclass and popclass when tsubst'ing type
and arguments.
* search.c (type_access_control): Do type access for TEMPLATE_DECL
too.

* g++.dg/template/access4.C: New test.
* g++.dg/template/access5.C: New test.
* g++.old-deja/g++.pt/memtemp85.C: Fix access problem.
* g++.old-deja/g++.pt/memtemp86.C: Likewise.
* g++.old-deja/g++.pt/ttp58.C: Likewise.
* g++.old-deja/g++.pt/memtemp89.C: Remove XFAIL.

From-SVN: r55649
13 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parse.y
gcc/cp/pt.c
gcc/cp/search.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/access4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/access5.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/memtemp85.C
gcc/testsuite/g++.old-deja/g++.pt/memtemp86.C
gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C
gcc/testsuite/g++.old-deja/g++.pt/ttp58.C
This page took 0.066895 seconds and 5 git commands to generate.