From cdd0bb4bde4f6885045e65860de0320ccf6b23f6 Mon Sep 17 00:00:00 2001 From: jkratoch Date: Mon, 25 Apr 2011 18:05:37 +0000 Subject: include/ * ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h. contrib/ * paranoia.cc (ENUM_BITFIELD): Remove. gcc/ * system.h (ENUM_BITFIELD): Remove. libcpp/ * system.h (ENUM_BITFIELD): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172933 138bc75d-0d04-0410-961f-82ee72b054a4 --- include/ansidecl.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/ansidecl.h') diff --git a/include/ansidecl.h b/include/ansidecl.h index 8b76647426b..c39ce2f5d70 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -416,6 +416,15 @@ So instead we use the macro below and test it against specific values. */ #define EXPORTED_CONST const #endif +/* 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 +#else +#define ENUM_BITFIELD(TYPE) unsigned int +#endif + #ifdef __cplusplus } #endif -- cgit v1.2.1