bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex_internal.h modification lead to GCC crash


From: Derek Price
Subject: Re: regex_internal.h modification lead to GCC crash
Date: Tue, 20 Sep 2005 09:37:01 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Paul Eggert wrote:

>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
>  
>

This patch works fine on BSD 1.6.1, one of the offending systems and I
expect it will work fine on the rest.  I've installed it in CVS CVS,
though, and I'll be sure to let you know if it doesn't work after
tonight's nightly testing.  :)

I made a small modification to your patch and attached the new version. 
The only addition is that I removed the two lines which blank `pure' and
`inline' for GCC < 3 since they won't be used anyhow when
`__attribute(arg)' is blanked for GCC < 3.1.

Regards,

Derek

-- 
Derek R. Price
CVS Solutions Architect
Ximbiot <http://ximbiot.com>
v: +1 717.579.6168
f: +1 717.234.3125
<mailto:address@hidden>

Index: lib/regex_internal.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/regex_internal.h,v
retrieving revision 1.16
diff -u -p -r1.16 regex_internal.h
--- lib/regex_internal.h        16 Sep 2005 00:23:36 -0000      1.16
+++ lib/regex_internal.h        20 Sep 2005 13:33:16 -0000
@@ -84,25 +84,10 @@
 # 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
 # define BE(expr, val) (expr)
-# define inline
-# define pure
 #endif
 
 /* Number of single byte character.  */
@@ -127,7 +112,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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]