summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-20 22:15:07 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-20 22:15:07 +0000
commitc17154eb97da9c72b17812e8ee1ade0d9bd6db33 (patch)
tree8ea10ee415e476cfe0b3f1c8340a58cf30831a74 /gcc/c-decl.c
parente6b82afc8bc3e215ea6f07dcbe997c5892355511 (diff)
downloadgcc-c17154eb97da9c72b17812e8ee1ade0d9bd6db33.tar.gz
* c-decl.c (check_bitfield_type_and_width): Don't allow _Bool
bit-fields wider than one bit. testsuite: * gcc.dg/c99-bool-2.c, gcc.dg/c99-bool-3.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index ee8e7853383..493a57ed714 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3853,10 +3853,7 @@ check_bitfield_type_and_width (tree *type, tree *width, const char *orig_name)
&& type_mv != boolean_type_node)
pedwarn ("type of bit-field %qs is a GCC extension", name);
- if (type_mv == boolean_type_node)
- max_width = CHAR_TYPE_SIZE;
- else
- max_width = TYPE_PRECISION (*type);
+ max_width = TYPE_PRECISION (*type);
if (0 < compare_tree_int (*width, max_width))
{