OSDN Git Service

* c-decl.c (build_enumerator): Don't modify the value's type,
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 May 2000 09:08:42 +0000 (09:08 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 May 2000 09:08:42 +0000 (09:08 +0000)
convert it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34131 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-decl.c

index 7d37b3a..b874d9f 100644 (file)
@@ -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.
index 20c6089..34fca5d 100644 (file)
@@ -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);