aboutsummaryrefslogtreecommitdiff
path: root/include/ansidecl.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-10-22 01:35:29 +0000
committerDJ Delorie <dj@redhat.com>2011-10-22 01:35:29 +0000
commit006d5c8857785cb10f6172e0e3bd7ed7b5c73181 (patch)
treed0e8a4342a68407d3e3f6c6147f0a7b1995bf3b9 /include/ansidecl.h
parent2954ce4ce4e28ed30bf80429ebacc94558aade74 (diff)
downloadgdb-006d5c8857785cb10f6172e0e3bd7ed7b5c73181.zip
gdb-006d5c8857785cb10f6172e0e3bd7ed7b5c73181.tar.gz
gdb-006d5c8857785cb10f6172e0e3bd7ed7b5c73181.tar.bz2
* 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 c39ce2f..23d85bf 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