OSDN Git Service

Mark ChangeLog
[pf3gnuchains/gcc-fork.git] / include / ansidecl.h
index 8b76647..23d85bf 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