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
This commit is contained in:
Alexandre Oliva 2000-05-24 09:08:42 +00:00 committed by Alexandre Oliva
parent 800839de56
commit 0543d026a2
2 changed files with 6 additions and 2 deletions

View 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.

View 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);