2012-11-09 Nick Clifton <nickc@redhat.com>
[deliverable/binutils-gdb.git] / include / ansidecl.h
index 8b76647426bf9641c0b0c969efa23d2886831b8c..23d85bf0e1617bebd508e0dbd3e0bd3748d5614b 100644 (file)
@@ -416,6 +416,17 @@ 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 C++ or GCC.
+   FIXME: provide a complete autoconf test for buggy enum bitfields.  */
+
+#ifdef __cplusplus
+#define ENUM_BITFIELD(TYPE) enum TYPE
+#elif (GCC_VERSION > 2000)
+#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
+#else
+#define ENUM_BITFIELD(TYPE) unsigned int
+#endif
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.023224 seconds and 4 git commands to generate.