[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dfa.c fix for C89 compilers
From: |
Jim Meyering |
Subject: |
Re: dfa.c fix for C89 compilers |
Date: |
Wed, 31 Mar 2010 16:48:52 +0200 |
Aharon Robbins wrote:
...
> diff -u -r1.27 dfa.c
> --- dfa.c 29 Mar 2010 02:58:08 -0000 1.27
> +++ dfa.c 31 Mar 2010 12:45:16 -0000
> @@ -2781,6 +2781,7 @@
> unsigned char eol = eolbyte; /* Likewise for eolbyte. */
> static int sbit[NOTCHAR]; /* Table for anding with d->success. */
> static int sbit_init;
> + unsigned char saved_end;
>
> if (! sbit_init)
> {
> @@ -2798,7 +2799,7 @@
> s = s1 = 0;
> p = (unsigned char const *) begin;
> trans = d->trans;
> - unsigned char saved_end = *(unsigned char *) end;
> + saved_end = *(unsigned char *) end;
Hi Arnold,
Thanks, but I have to refuse such changes, especially in the likes
of dfa.c. They decrease readability. It is already too complex,
and as soon as grep stabilizes (i.e. goes a week or so without a new bug
report) I plan to move many more declarations "down", along with other
clean-up and maintainability- and readability-improving changes.
If there is sufficient interest (and justification), I might agree
to maintain a patch file that applies changes like the one above,
but that's all. I moved coreutils away from strict c89 compliance
with the introduction of such declare-after-stmt uses about 3 years
ago. Since then, there have been very few complaints, and most of
those were out of laziness in using long-out-of-date compilers and
not having the time to build/install gcc.
c89 is now 21 years old.