aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-12-04 23:56:00 +0000
committerJason Merrill <merrill@gnu.org>1995-12-04 23:56:00 +0000
commit57883245f35ac30d83c43339b45927b1cb20e4e6 (patch)
treef29f9bb786b8fb3cf03cdad97df9521e36996b2d /gcc
parent953776a3f518c0a7cbc778a69b2dc2f87ca733d8 (diff)
downloadgcc-57883245f35ac30d83c43339b45927b1cb20e4e6.zip
gcc-57883245f35ac30d83c43339b45927b1cb20e4e6.tar.gz
gcc-57883245f35ac30d83c43339b45927b1cb20e4e6.tar.bz2
(finish_struct): Don't mess with the type of bitfields.
From-SVN: r10673
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-decl.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 2016521..68d61db 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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