diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-04 01:13:38 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-04 01:13:38 +0000 |
commit | 15da6f57799eeb23fed8bb0dd0183ff72a0e1b8a (patch) | |
tree | 535d62d57879a72b06b9a114de02fc656c1fcc62 /gcc/cp/pt.c | |
parent | 7a24a159e319d3b9231cdc91ac78bef652c8373c (diff) | |
download | gcc-15da6f57799eeb23fed8bb0dd0183ff72a0e1b8a.tar.gz |
* decl.c (finish_enum): Do set the type in a template. Simplify.
* pt.c (tsubst_enum, tsubst_copy): Revert last patch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63754 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ac5e4e1c8ef..a0589781010 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7143,10 +7143,6 @@ tsubst_copy (t, args, complain, in_decl) = tsubst_aggr_type (TREE_TYPE (t), args, complain, in_decl, /*entering_scope=*/0); - /* Not yet available. */ - if (!enum_type || enum_type == (TREE_TYPE (t))) - return t; - for (v = TYPE_VALUES (enum_type); v != NULL_TREE; v = TREE_CHAIN (v)) @@ -11073,12 +11069,7 @@ tsubst_enum (tag, newtag, args) for (e = TYPE_VALUES (tag); e; e = TREE_CHAIN (e)) { tree value; - - /* Copy node and set type */ - if (DECL_INITIAL (TREE_VALUE (e))) - DECL_INITIAL (TREE_VALUE (e)) = copy_node (DECL_INITIAL (TREE_VALUE (e))); - TREE_TYPE (TREE_VALUE (e)) = tag; - + /* Note that in a template enum, the TREE_VALUE is the CONST_DECL, not the corresponding INTEGER_CST. */ value = tsubst_expr (DECL_INITIAL (TREE_VALUE (e)), |