GNU bug report logs -
#8977
Parse error: Compile coreutils 8.9 with gcc 2.95.3
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8977 in the body.
You can then email your comments to 8977 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#8977
; Package
coreutils
.
(Fri, 01 Jul 2011 16:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Wolfgang Steinwender <wolfgang <at> psysteme.de>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 01 Jul 2011 16:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
compiling coreutils 8.9 with gcc 2.95.3:
heap.c: In function `heap_remove_top':
heap.c:99: parse error before `void'
heap.c:103: `top' undeclared (first use in this function)
heap.c:103: (Each undeclared identifier is reported only once
heap.c:103: for each function it appears in.)
I hat to change this:
void *
heap_remove_top (struct heap *heap)
{
if (heap->count == 0)
return NULL;
void *top = heap->array[1];
heap->array[1] = heap->array[heap->count--];
heapify_down (heap->array, heap->count, 1, heap->compare);
return top;
}
to this:
void *
heap_remove_top (struct heap *heap)
{
void* top;
if (heap->count == 0)
return NULL;
top = heap->array[1];
heap->array[1] = heap->array[heap->count--];
heapify_down (heap->array, heap->count, 1, heap->compare);
return top;
}
The problem is also in the latest git version.
Thanks,
W. Steinwender
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#8977
; Package
coreutils
.
(Fri, 01 Jul 2011 17:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8977 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 07/01/2011 02:43 AM, Wolfgang Steinwender wrote:
> Hi,
>
> compiling coreutils 8.9 with gcc 2.95.3:
Thanks for the report. However, this is not a bug in coreutils, since
we explicitly document in the "Pre-C99 build failure" section in README
the minimum compiler that we are willing to support.
> {
> if (heap->count == 0)
> return NULL;
>
> void *top = heap->array[1];
The declaration-after-statement construct is required by C99 (now more
than 10 years old), and supported as an extension by a number of C89
compilers. Your problem is that gcc 2.95.3 is SOOOO old that it does
not understand this extension.
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Added tag(s) notabug.
Request was from
Eric Blake <eblake <at> redhat.com>
to
control <at> debbugs.gnu.org
.
(Fri, 01 Jul 2011 17:49:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
8977 <at> debbugs.gnu.org and Wolfgang Steinwender <wolfgang <at> psysteme.de>
Request was from
Eric Blake <eblake <at> redhat.com>
to
control <at> debbugs.gnu.org
.
(Fri, 01 Jul 2011 17:49:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#8977
; Package
coreutils
.
(Fri, 01 Jul 2011 21:18:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 8977 <at> debbugs.gnu.org (full text, mbox):
On 01/07/11 09:43, Wolfgang Steinwender wrote:
> Hi,
>
> compiling coreutils 8.9 with gcc 2.95.3:
>
> heap.c: In function `heap_remove_top':
> heap.c:99: parse error before `void'
> heap.c:103: `top' undeclared (first use in this function)
> heap.c:103: (Each undeclared identifier is reported only once
> heap.c:103: for each function it appears in.)
heap.c is one of the files we might like to have
c89 support with, as it may be moved to gnulib.
I'm a bit confused though.
Did the rest of coreutils compile without issue?
Similar code is used in many places.
Also as a matter of interest, what system is this?
cheers,
Pádraig.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 30 Jul 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.