aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/class.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 94d0b96..5f589da 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
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.
* parse.y (enumlist_opt): New reduction.
(structsp): Simplify enum rules to use enumlist_opt.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 4373f13..78ed032 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -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;