aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorRobert Lipe <robertlipe@usa.net>2000-04-18 19:42:30 +0000
committerRobert Lipe <robertl@gcc.gnu.org>2000-04-18 19:42:30 +0000
commitc149cc37c87cd454fec56f5032cc1e4b10feca16 (patch)
tree796b4e2bf06329dfa2420c489ee8acf507d84c7f /gcc/system.h
parentaa4661f82360b21f5048823019740e80ed4efbe3 (diff)
downloadgcc-c149cc37c87cd454fec56f5032cc1e4b10feca16.zip
gcc-c149cc37c87cd454fec56f5032cc1e4b10feca16.tar.gz
gcc-c149cc37c87cd454fec56f5032cc1e4b10feca16.tar.bz2
configure.in (ENUM_BITFIELDS_ARE_UNSIGNED): Added.
* configure.in (ENUM_BITFIELDS_ARE_UNSIGNED): Added. Check that bitfields of the host compiler are not signed quantities. * config.in: Regenerate. * configure: Regenerate. * system.h (USE_ENUM_BITFIELDS): Added. (ENUM_BITFIELDS): Added. * rtl.h (rtx_def): Members `code', `mode', now ENUM_BITFIELD. (SHORT_ENUM_BUG): Deleted. * tree.h (tree_common): Members `code', `mode', `built_in_class', now ENUM_BITFIELD. * config/i386/xm-sco.h (ONLY_INT_FIELDS): Deleted. (CODE_FIELD_BUG): Likewise. * config/m68k/x-apollo68 (CC): Deleted SHORT_ENUM_BUG. (OLD_CC): Likewise. * config/m68k/x-ccur (X_CFLAGS): Likewise. From-SVN: r33233
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index cdbcf9d..6a74946 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -547,4 +547,16 @@ extern void abort PARAMS ((void));
/* Get libiberty declarations. */
#include "libiberty.h"
+/* Enumerated bitfields are safe to use unless we've been explictly told
+ * otherwise or if they are signed. */
+
+#define USE_ENUM_BITFIELDS __GNUC__ || (!ONLY_INT_FIELDS && ENUM_BTIFIELDS_ARE_UNSIGNED)
+
+#if USE_ENUM_BITFIELDS
+#define ENUM_BITFIELD(TYPE) enum TYPE
+#else
+#define ENUM_BITFIELD(TYPE) unsigned int
+#endif
+
+
#endif /* __GCC_SYSTEM_H__ */