aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2004-01-27 02:33:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2004-01-27 02:33:22 +0000
commit1c62e7b282ae85cf578a3af015941e717422f116 (patch)
treeb72bec59563c306cade59d3562d4d103bc29ffb3 /gcc/system.h
parentba9119ec894e7151e50cc5889fe3b6381d096e8c (diff)
downloadgcc-1c62e7b282ae85cf578a3af015941e717422f116.zip
gcc-1c62e7b282ae85cf578a3af015941e717422f116.tar.gz
gcc-1c62e7b282ae85cf578a3af015941e717422f116.tar.bz2
system.h (CHAR_BITFIELD): Delete.
* system.h (CHAR_BITFIELD): Delete. (BOOL_BITFIELD): New. * c-decl.c (c_scope): Use BOOL_BITFIELD. * gengtype-lex.l: Recognize BOOL_BITFIELD instead of CHAR_BITFIELD. cp: * cp-tree.h (language_function, lang_type_header): Use BOOL_BITFIELD. * name-lookup.h (cp_binding_level): Likewise. From-SVN: r76686
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 93cfd18..defeed0 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -486,16 +486,21 @@ extern int snprintf (char *, size_t, const char *, ...);
#define HOST_BIT_BUCKET "/dev/null"
#endif
-/* Be conservative and only use enum bitfields with GCC. Likewise for
- char bitfields.
+/* Be conservative and only use enum bitfields with GCC.
FIXME: provide a complete autoconf test for buggy enum bitfields. */
#if (GCC_VERSION > 2000)
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
-#define CHAR_BITFIELD __extension__ unsigned char
#else
#define ENUM_BITFIELD(TYPE) unsigned int
-#define CHAR_BITFIELD unsigned int
+#endif
+
+/* We only use bool bitfields with gcc3. Some supposedly C99
+ compilers don't handle them correctly. */
+#if (GCC_VERSION >= 3000)
+#define BOOL_BITFIELD _Bool
+#else
+#define BOOL_BITFIELD unsigned int
#endif
#ifndef offsetof