aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>1999-08-03 14:45:20 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>1999-08-03 14:45:20 +0000
commit13bd123dfbe7b4df76cd1e20a88d592c639eabe4 (patch)
treeeb73f6b089eef6109c0f9da6c7b8d51fd78b24f6 /gcc
parent8e64077dd3bb3e5630535ec7cee5b9876581fc0f (diff)
downloadgcc-13bd123dfbe7b4df76cd1e20a88d592c639eabe4.zip
gcc-13bd123dfbe7b4df76cd1e20a88d592c639eabe4.tar.gz
gcc-13bd123dfbe7b4df76cd1e20a88d592c639eabe4.tar.bz2
* class.c (duplicate_tag_error): Preserve template information.
From-SVN: r28473
Diffstat (limited to 'gcc')
-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;