From 1ae0d051e5e31ea120a9f96d916c8cd9e505e4fc Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 25 Apr 2011 18:28:53 +0000 Subject: [PATCH] gdb/ * 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 | 4 ++++ gdb/defs.h | 9 --------- include/ChangeLog | 8 ++++++++ include/ansidecl.h | 9 +++++++++ include/bfdlink.h | 6 ------ 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 09681fd6898..5d594bd2b40 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-04-25 Jan Kratochvil + + * defs.h (ENUM_BITFIELD): Remove. + 2011-04-24 Jan Kratochvil Eli Zaretskii diff --git a/gdb/defs.h b/gdb/defs.h index 28494292464..089631cf3e5 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -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; diff --git a/include/ChangeLog b/include/ChangeLog index 634b21ceb90..dfdc19126cb 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2011-04-25 Jan Kratochvil + + * bfdlink.h (ENUM_BITFIELD): Remove. + +2011-04-25 Jan Kratochvil + + * ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h. + 2011-04-24 Alan Modra PR ld/12365 diff --git a/include/ansidecl.h b/include/ansidecl.h index 8b76647426b..c39ce2f5d70 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -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 diff --git a/include/bfdlink.h b/include/bfdlink.h index 4c649d9395b..50a14236791 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -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 { -- 2.30.2