(default_conversion): For enum that's unsigned,

if it's at least as wide as int, convert to an unsigned type.

From-SVN: r5272
This commit is contained in:
Richard Stallman 1993-09-07 12:26:58 +00:00
parent 75b4643788
commit 86463d5d64

View File

@ -944,7 +944,9 @@ default_conversion (exp)
{ {
type = type_for_size (MAX (TYPE_PRECISION (type), type = type_for_size (MAX (TYPE_PRECISION (type),
TYPE_PRECISION (integer_type_node)), TYPE_PRECISION (integer_type_node)),
(flag_traditional && TREE_UNSIGNED (type))); ((flag_traditional
|| TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node))
&& TREE_UNSIGNED (type)));
return convert (type, exp); return convert (type, exp);
} }