bug-gzip
[Top][All Lists]
Advanced

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

Re: C99ism in gzip 1.4 inflate.c


From: Eric Blake
Subject: Re: C99ism in gzip 1.4 inflate.c
Date: Mon, 19 Jul 2010 08:37:26 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

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.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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