diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1994-05-18 13:51:28 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1994-05-18 13:51:28 -0700 |
commit | b02cb287c9ec8c3d240fd306fea09fc7ef92f869 (patch) | |
tree | 94d8f43be09babbf87a3a9b30dea834d76b32467 | |
parent | 1d1a832c5c786ad10f2b2116745a44cc172cba85 (diff) | |
download | gcc-b02cb287c9ec8c3d240fd306fea09fc7ef92f869.zip gcc-b02cb287c9ec8c3d240fd306fea09fc7ef92f869.tar.gz gcc-b02cb287c9ec8c3d240fd306fea09fc7ef92f869.tar.bz2 |
Allow any integral type for bitfields (such as booleans).
From-SVN: r7330
-rw-r--r-- | gcc/stor-layout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 1aff02b..d2c6f28 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -217,11 +217,10 @@ layout_decl (decl, known_align) if (code == FIELD_DECL && DECL_BIT_FIELD (decl)) { /* This is a bit-field. We don't know how to handle - them except for integers and enums, and front end should + them except for integral types, and front ends should never generate them otherwise. */ - if (! (TREE_CODE (type) == INTEGER_TYPE - || TREE_CODE (type) == ENUMERAL_TYPE)) + if (! INTEGRAL_TYPE_P (type)) abort (); if (spec_size == 0 && DECL_NAME (decl) != 0) |