OSDN Git Service

(finish_struct): Don't mess with the type of bitfields.
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Dec 1995 23:56:00 +0000 (23:56 +0000)
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Dec 1995 23:56:00 +0000 (23:56 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10673 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-decl.c

index 2016521..68d61db 100644 (file)
@@ -5690,27 +5690,6 @@ finish_struct (t, fieldlist, attributes)
       TYPE_ALIGN (x) = TYPE_ALIGN (t);
     }
 
-  /* Promote each bit-field's type to int if it is narrower than that.  */
-  for (x = fieldlist; x; x = TREE_CHAIN (x))
-    if (DECL_BIT_FIELD (x)
-       && (C_PROMOTING_INTEGER_TYPE_P (TREE_TYPE (x))
-           || DECL_FIELD_SIZE (x) < TYPE_PRECISION (integer_type_node)))
-      {
-       tree type = TREE_TYPE (x);
-
-       /* Preserve unsignedness if traditional
-          or if not really getting any wider.  */
-       if (TREE_UNSIGNED (type)
-           && (flag_traditional
-               ||
-               (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)
-                &&
-                DECL_FIELD_SIZE (x) == TYPE_PRECISION (integer_type_node))))
-         TREE_TYPE (x) = unsigned_type_node;
-       else
-         TREE_TYPE (x) = integer_type_node;
-      }
-
   /* If this was supposed to be a transparent union, but we can't
      make it one, warn and turn off the flag.  */
   if (TREE_CODE (t) == UNION_TYPE