aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-decl.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d37b3a..b874d9f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-24 Alexandre Oliva <aoliva@cygnus.com>
+
+ * c-decl.c (build_enumerator): Don't modify the value's type,
+ convert it.
+
2000-05-24 Andreas Jaeger <aj@suse.de>
* mips.h (LINKER_ENDIAN_SPEC): Pass -EL to linker by default.
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);