[Top][All Lists]

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

Re: C99ism in gzip 1.4 inflate.c

From: Jim Meyering
Subject: Re: C99ism in gzip 1.4 inflate.c
Date: Mon, 19 Jul 2010 17:34:48 +0200

Eric Blake wrote:
> On 07/18/2010 06:51 AM, Jay K wrote:
>> C99ism in gzip 1.4 inflate.c:
>> inflate.c: In function `inflate_codes':
>> inflate.c:592: parse error before `unsigned'
>> inflate.c:593: `delta' undeclared (first use in this function)
>> inflate.c:593: (Each undeclared identifier is reported only once
>> inflate.c:593: for each function it appears in.)
>> make[1]: *** [inflate.o] Error 1
>> make[1]: Leaving directory `/usr/users/m3build/src/gzip-1.4'
> Thanks for the report.
> These days, declaration after statement (a C99 feature, required 11
> years ago!) is pretty common among compilers, even if they aren't fully
> C99 compliant.  We have already used this particular C99 feature in
> coreutils for several years now, with very few complaints of an
> inability to compile it (and for those complaining, the fixes necessary
> to get back to pure C89 were rather trivial, as is the case with your
> attached patch).  While gnulib still caters to C89, I'm not sure whether
> the gzip policy is to be this strict or to assume newer compilers along
> the lines already assumed by coreutils.
>> I suggest maybe use autoconf to pass -std=c89 to gcc if it accepts it.
> That's only if we decide to make a policy of requiring that gzip must
> still support C89.  However, I'm not the primary maintainer, so Jim will
> have to weigh in on this discussion.

Hi Jay,

It looks like you're using gcc.  If not,
please describe the environment in which you are compiling:
hardware, OS, compiler version, etc.

While that sole decl-after-stmt is relatively new,
I'm reluctant to accommodate ancient compilers unless
there is a compelling argument.
Why can't you accommodate this tiny part of c99?

reply via email to

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