Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-10-22 05:35:29 +0400
committerDJ Delorie <dj@redhat.com>2011-10-22 05:35:29 +0400
commitbdea9e5fe8cb19d89015d8a6543ecab4b9e76a01 (patch)
treeab4961af3d0a707c2e4243d151538575f4753bb2 /include/ansidecl.h
parent22e671336e8db5fe4f026d1c0c8eb98b4e7d728f (diff)
* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
* ansidecl.h (ENUM_BITFIELD): Always use enum in C++
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r--include/ansidecl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h
index c39ce2f5d..23d85bf0e 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -416,10 +416,12 @@ 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.
+/* Be conservative and only use enum bitfields with C++ or GCC.
FIXME: provide a complete autoconf test for buggy enum bitfields. */
-#if (GCC_VERSION > 2000)
+#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