]> gcc.gnu.org Git - gcc.git/commitdiff
(finish_enum): Undo previous change.
authorRichard Stallman <rms@gnu.org>
Thu, 4 Nov 1993 19:39:42 +0000 (19:39 +0000)
committerRichard Stallman <rms@gnu.org>
Thu, 4 Nov 1993 19:39:42 +0000 (19:39 +0000)
From-SVN: r5997

gcc/c-decl.c

index 26a0bfbc8c31334d8f084a31c13f899397c0a2bc..bb2ad125c1a06c81cd84a887fcca9771d287bb50 100644 (file)
@@ -5566,12 +5566,8 @@ finish_enum (enumtype, values)
   TYPE_SIZE (enumtype) = 0;
   layout_type (enumtype);
 
-  /* If an enum has no negative values, and it goes beyond the range
-     of the signed integral type, make it unsigned.  */
-  TREE_UNSIGNED (enumtype)
-    = (! tree_int_cst_lt (minnode, integer_zero_node)
-       && ! tree_int_cst_lt (maxnode,
-                            TYPE_MAX_VALUE (type_for_size (precision, 0))));
+  /* An enum can have some negative values; then it is signed.  */
+  TREE_UNSIGNED (enumtype) = ! tree_int_cst_lt (minnode, integer_zero_node);
 
   /* Change the type of the enumerators to be the enum type.
      Formerly this was done only for enums that fit in an int,
This page took 0.072072 seconds and 5 git commands to generate.