]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (instantiate_class_template): Clean-up.
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Fri, 25 Nov 2005 12:46:40 +0000 (12:46 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Fri, 25 Nov 2005 12:46:40 +0000 (12:46 +0000)
* pt.c (instantiate_class_template): Clean-up.

From-SVN: r107499

gcc/cp/ChangeLog
gcc/cp/pt.c

index f3fbb462a71c0b4078039adda998c9f9c95fe4c0..5d7c21be48531992bbea2a98fbfc31dc36a9a6c3 100644 (file)
@@ -1,3 +1,7 @@
+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 ...
index dba4c44c5c4ae9f98fc50d6a96294f7a6930e279..5f28b4193a7c4b66dad1d1f1c10dffcf8ed9e882 100644 (file)
@@ -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