aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@cygnus.com>2000-05-24 09:08:42 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2000-05-24 09:08:42 +0000
commit0543d026a2a6366375b25b55dd318eb1cca6876c (patch)
tree6a878f09c0db8e786427ee42e9fc4419e08d23ac /gcc/c-decl.c
parent800839de56a961303aff096a293b9361c911d6cd (diff)
downloadgcc-0543d026a2a6366375b25b55dd318eb1cca6876c.zip
gcc-0543d026a2a6366375b25b55dd318eb1cca6876c.tar.gz
gcc-0543d026a2a6366375b25b55dd318eb1cca6876c.tar.bz2
c-decl.c (build_enumerator): Don't modify the value's type, convert it.
* c-decl.c (build_enumerator): Don't modify the value's type, convert it. From-SVN: r34131
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 20c6089..34fca5d 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5666,8 +5666,7 @@ build_enumerator (name, value)
&& TREE_UNSIGNED (type)));
decl = build_decl (CONST_DECL, name, type);
- DECL_INITIAL (decl) = value;
- TREE_TYPE (value) = type;
+ DECL_INITIAL (decl) = convert (type, value);
pushdecl (decl);
return tree_cons (decl, value, NULL_TREE);