gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 25 Apr 2011 18:28:53 +0000 (18:28 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 25 Apr 2011 18:28:53 +0000 (18:28 +0000)
* defs.h (ENUM_BITFIELD): Remove.

include/
* bfdlink.h (ENUM_BITFIELD): Remove.

merge from gcc:
include/
* ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h.

gdb/ChangeLog
gdb/defs.h
include/ChangeLog
include/ansidecl.h
include/bfdlink.h

index 09681fd..5d594bd 100644 (file)
@@ -1,3 +1,7 @@
+2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * defs.h (ENUM_BITFIELD): Remove.
+
 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
            Eli Zaretskii  <eliz@gnu.org>
 
index 2849429..089631c 100644 (file)
@@ -271,15 +271,6 @@ struct cleanup
     void *arg;
   };
 
-/* Be conservative and use enum bitfields only with GCC.
-   This is copied from gcc 3.3.1, system.h.  */
-
-#if defined(__GNUC__) && (__GNUC__ >= 2)
-#define ENUM_BITFIELD(TYPE) enum TYPE
-#else
-#define ENUM_BITFIELD(TYPE) unsigned int
-#endif
-
 /* vec.h-style vectors of strings want a typedef for char * .  */
 
 typedef char * char_ptr;
index 634b21c..dfdc191 100644 (file)
@@ -1,3 +1,11 @@
+2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * bfdlink.h (ENUM_BITFIELD): Remove.
+
+2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h.
+
 2011-04-24  Alan Modra  <amodra@gmail.com>
 
        PR ld/12365
index 8b76647..c39ce2f 100644 (file)
@@ -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
index 4c649d9..50a1423 100644 (file)
 #ifndef BFDLINK_H
 #define BFDLINK_H
 
-#if (__GNUC__ * 1000 + __GNUC_MINOR__ > 2000)
-#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
-#else
-#define ENUM_BITFIELD(TYPE) unsigned int
-#endif
-
 /* Which symbols to strip during a link.  */
 enum bfd_link_strip
 {