This is getting a bit complicated and I suspect we will run into further problems like this....
How about if we do this instead? The basic idea is to shut off __attribute__ entirely for GCC before 3.1. There's little point to figuring out exactly when each attribute was added. We can simply pick a single reasonable cutoff for the GCC versions we cater to well (for now, 3.1 -- we can maybe change it later). All we need to do is ensure the code works with older compilers; it needn't be super-optimized. --- regex_internal.h 2005-09-15 17:23:36.000000000 -0700 +++ /tmp/regex_internal.h 2005-09-19 22:50:27.000000000 -0700 @@ -84,19 +84,6 @@ # define RE_ENABLE_I18N #endif -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#if !__GNUC_PREREQ (3, 1) -# define always_inline -#endif - #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else @@ -127,7 +114,7 @@ # define attribute_hidden #endif /* not _LIBC */ -#ifdef __GNUC__ +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) # define __attribute(arg) __attribute__ (arg) #else # define __attribute(arg) _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib