bug-gnulib
[Top][All Lists]
Advanced

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

Re: error compiling regex gnulib module with pgcc compiler


From: Jim Meyering
Subject: Re: error compiling regex gnulib module with pgcc compiler
Date: Thu, 05 Feb 2009 20:09:31 +0100

Paul Eggert <address@hidden> wrote:
> Ralf Wildenhues <address@hidden> writes:
>
>>> Thanks for checking that.  Can you please run the following
>>> program on that platform and send us the output?  If it outputs
>>> "preprocessor thinks BITSET_WORD_BITS = 64", then we have an
>>> obvious fix to regex_internal.h.  Thanks.
>>
>> Yes
>
> OK, thanks, I installed the following patch into both gnulib and
> coreutils.  A pgcc maintainer wrote me that this should be fixed when
> version 6.1-2 comes out, so I put that into the comment.
>
> 2006-01-10  Paul Eggert  <address@hidden>
>
>       * regex_internal.h (BITSET_WORD_BITS):
>       Work around a bug in 64-bit PGC (before version 6.1-2), where the
>       preprocessor mishandles large unsigned values as if they were signed.
>       Problem reported by Claudio Fontana in
>       <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.

Hoping that in the intervening 3 years, the offending versions of pgcc
have faded into disuse, I'm reverting this patch,

    http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=e48d8b47fb3eee8

since with the upcoming gcc-4.4 it causes a compilation error:

    regex_internal.h:189:55: error: integer overflow in preprocessor expression

This was reported against parted in November,
I've noticed it in coreutils, too.

If someone cares enough about those buggy old versions of PGC,
they will find a better solution.


>From b8da52208f93e3e3bea7a8f06cc8691dec45264a Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 5 Feb 2009 19:57:35 +0100
Subject: [PATCH] regex: avoid compilation failure with upcoming gcc-4.4

* lib/regex_internal.h: Revert e48d8b47fb3eee81d341b71c3e006efe9e3433a7
[workaround for PGC prior to 6.1-2].  Otherwise, we'd get this:
"... error: integer overflow in preprocessor expression".
---
 lib/regex_internal.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index d3d58e8..859832f 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -184,10 +184,6 @@ typedef unsigned long int bitset_word_t;
 # if BITSET_WORD_BITS <= SBC_MAX
 #  error "Invalid SBC_MAX"
 # endif
-#elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff
-/* Work around a bug in 64-bit PGC (before version 6.1-2), where the
-   preprocessor mishandles large unsigned values as if they were signed.  */
-# define BITSET_WORD_BITS 64
 #else
 # error "Add case for new bitset_word_t size"
 #endif
--
1.6.1.2.511.gc5d3f




reply via email to

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