diff --git a/include/ChangeLog b/include/ChangeLog index 634b21ceb..dfdc19126 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 8b7664742..c39ce2f5d 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 4c649d939..50a142367 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 {