[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed: minor glitch that prevents building it in GCC 2.96
From: |
Paolo Bonzini |
Subject: |
Re: sed: minor glitch that prevents building it in GCC 2.96 |
Date: |
Fri, 18 Jul 2014 23:29:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Il 18/07/2014 19:52, Oliver Schneider ha scritto:
> Hi,
>
> I happened to be working on an ancient Redhat system with GCC 2.96 and
> got the following error:
>
> gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -I../lib -g -O2 -MT
> regex.o -MD -MP -MF .deps/regex.Tpo -c -o regex.o regex.c
> In file included from regex.c:71:
> regcomp.c: In function `init_word_char':
> regcomp.c:958: parse error before `int'
> regcomp.c:971: `i' undeclared (first use in this function)
> regcomp.c:971: (Each undeclared identifier is reported only once
> regcomp.c:971: for each function it appears in.)
> regcomp.c:983: `ch' undeclared (first use in this function)
> regcomp.c:994: `j' undeclared (first use in this function)
>
> The problem turns out to be the fact that a statement comes before the
> variable declarations on line 957.
>
> -----------------------
> $ diff -u lib/regcomp.c lib/regcomp.c-patched |tee regcomp.c.patch
> --- lib/regcomp.c 2012-12-22 13:21:52.000000000 +0000
> +++ lib/regcomp.c-patched 2014-07-18 17:42:24.000000000 +0000
> @@ -954,10 +954,10 @@
> internal_function
> init_word_char (re_dfa_t *dfa)
> {
> - dfa->word_ops_used = 1;
> int i = 0;
> int j;
> int ch = 0;
> + dfa->word_ops_used = 1;
> if (BE (dfa->map_notascii == 0, 1))
> {
> bitset_word_t bits0 = 0x00000000;
> -----------------------
>
> Affected version: sed-4.2.2
>
> This was the only issue I ran into, so I guess it should be fixed since
> there is no apparent good reason to break backwards compatibility
> because of a single line.
Thanks for the report, I'm forwarding to bug-gnulib since the
lib/regcomp.c file comes from gnulib.
Paolo
> With best regards,
>
> // Oliver
>
> PS: patch also attached, but I'm not sure where this mail is going and
> whether it will get stripped :)
>
- Re: sed: minor glitch that prevents building it in GCC 2.96,
Paolo Bonzini <=