aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2005-11-25 12:46:40 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2005-11-25 12:46:40 +0000
commit2678bae869c78a3848e54835535de147a53b77cf (patch)
treecd0405a756b47ea841f3dc325b2a3b87ac3dce73
parent260cd73f5983bc7368c3a223f50b1566687b1980 (diff)
downloadgcc-2678bae869c78a3848e54835535de147a53b77cf.zip
gcc-2678bae869c78a3848e54835535de147a53b77cf.tar.gz
gcc-2678bae869c78a3848e54835535de147a53b77cf.tar.bz2
pt.c (instantiate_class_template): Clean-up.
* pt.c (instantiate_class_template): Clean-up. From-SVN: r107499
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f3fbb46..5d7c21b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ * pt.c (instantiate_class_template): Clean-up.
+
+2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
* pt.c (template_class_depth_real): Remove. Move functionality to ...
(template_class_depth): ... here, replacing count_specializations
with 0. Adjust comment.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index dba4c44..5f28b41 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5653,14 +5653,12 @@ instantiate_class_template (tree type)
{
/* Build new CLASSTYPE_NESTED_UTDS. */
- tree tag = t;
- tree name = TYPE_IDENTIFIER (tag);
tree newtag;
bool class_template_p;
- class_template_p = (TREE_CODE (tag) != ENUMERAL_TYPE
- && TYPE_LANG_SPECIFIC (tag)
- && CLASSTYPE_IS_TEMPLATE (tag));
+ class_template_p = (TREE_CODE (t) != ENUMERAL_TYPE
+ && TYPE_LANG_SPECIFIC (t)
+ && CLASSTYPE_IS_TEMPLATE (t));
/* If the member is a class template, then -- even after
substitution -- there may be dependent types in the
template argument list for the class. We increment
@@ -5669,7 +5667,7 @@ instantiate_class_template (tree type)
when outside of a template. */
if (class_template_p)
++processing_template_decl;
- newtag = tsubst (tag, args, tf_error, NULL_TREE);
+ newtag = tsubst (t, args, tf_error, NULL_TREE);
if (class_template_p)
--processing_template_decl;
if (newtag == error_mark_node)
@@ -5677,6 +5675,8 @@ instantiate_class_template (tree type)
if (TREE_CODE (newtag) != ENUMERAL_TYPE)
{
+ tree name = TYPE_IDENTIFIER (t);
+
if (class_template_p)
/* Unfortunately, lookup_template_class sets
CLASSTYPE_IMPLICIT_INSTANTIATION for a partial