]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* class.c (duplicate_tag_error): Preserve template information.
authorNathan Sidwell <nathan@acm.org>
Tue, 3 Aug 1999 14:45:20 +0000 (14:45 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 3 Aug 1999 14:45:20 +0000 (14:45 +0000)
From-SVN: r28473

gcc/cp/ChangeLog
gcc/cp/class.c

index 94d0b96c25ef48ee02a99f4d6b8150bf72dc825f..5f589da7375d92f7845295f2de8955153b1ebfbd 100644 (file)
@@ -1,3 +1,7 @@
+1999-08-03  Nathan Sidwell  <nathan@acm.org>
+
+       * class.c (duplicate_tag_error): Preserve template information.
+
 1999-08-03  Nathan Sidwell  <nathan@acm.org>
 
        * decl.c (start_enum): Show location of previous definition.
index 4373f139490397d5383378192759f10feef2a9e3..78ed03269e6dad1ce742727ce13ef0ed0b76946a 100644 (file)
@@ -2205,6 +2205,8 @@ duplicate_tag_error (t)
       tree binfo = TYPE_BINFO (t);
       int interface_only = CLASSTYPE_INTERFACE_ONLY (t);
       int interface_unknown = CLASSTYPE_INTERFACE_UNKNOWN (t);
+      tree template_info = CLASSTYPE_TEMPLATE_INFO (t);
+      int use_template = CLASSTYPE_USE_TEMPLATE (t);
 
       bzero ((char *) TYPE_LANG_SPECIFIC (t), sizeof (struct lang_type));
       BINFO_BASETYPES(binfo) = NULL_TREE;
@@ -2213,6 +2215,8 @@ duplicate_tag_error (t)
       CLASSTYPE_INTERFACE_ONLY (t) = interface_only;
       SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown);
       TYPE_REDEFINED (t) = 1;
+      CLASSTYPE_TEMPLATE_INFO (t) = template_info;
+      CLASSTYPE_USE_TEMPLATE (t) = use_template;
     }
   TYPE_SIZE (t) = NULL_TREE;
   TYPE_MODE (t) = VOIDmode;