This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit include/+gdb/] Re: [patch] ENUM_BITFIELD broke GDB


On Mon, 25 Apr 2011 06:04:04 +0200, Alan Modra wrote:
> On Sun, Apr 24, 2011 at 05:31:28PM +0200, Jan Kratochvil wrote:
> > include/
> > 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	* bfdlink.h (ENUM_BITFIELD): Move to ...
> > 	* ansidecl.h (ENUM_BITFIELD): ... here, use the one from GCC sources.
> > 
> > gdb/
> > 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	* defs.h (ENUM_BITFIELD): Remove.
> 
> Sorry for the breakage.  I'm not sure I have approval rights for
> ansidecl.h as this file is shared with gcc (and patches should be
> applied to both src and gcc repos), but the patch ought to come under
> the obvious rule..  However, given that gcc's system.h pulls
> in ansidecl.h via libiberty.h, the ENUM_BITFIELD in system.h should go
> too.

Therefore checked in gcc, merged from gcc ansidecl.h and fixed gdb/ as
obvious / self-approved and include/bfdlink.h as pre-approved by you.

Both binutils and gdb build now.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-04/msg00153.html
http://sourceware.org/ml/binutils-cvs/2011-04/msg00153.html

--- src/gdb/ChangeLog	2011/04/24 08:02:15	1.12947
+++ src/gdb/ChangeLog	2011/04/25 18:28:51	1.12948
@@ -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>
 
--- src/include/ChangeLog	2011/04/24 10:02:10	1.528
+++ src/include/ChangeLog	2011/04/25 18:28:52	1.529
@@ -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
--- src/gdb/defs.h	2011/04/19 18:04:07	1.290
+++ src/gdb/defs.h	2011/04/25 18:28:52	1.291
@@ -271,15 +271,6 @@
     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;
--- src/include/ansidecl.h	2010/01/05 21:10:23	1.28
+++ src/include/ansidecl.h	2011/04/25 18:28:52	1.29
@@ -416,6 +416,15 @@
 #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
--- src/include/bfdlink.h	2011/04/24 10:02:11	1.84
+++ src/include/bfdlink.h	2011/04/25 18:28:53	1.85
@@ -24,12 +24,6 @@
 #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
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]