[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8977: Parse error: Compile coreutils 8.9 with gcc 2.95.3
From: |
Wolfgang Steinwender |
Subject: |
bug#8977: Parse error: Compile coreutils 8.9 with gcc 2.95.3 |
Date: |
Fri, 01 Jul 2011 10:43:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Lightning/1.0b2 Thunderbird/3.1.10 |
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
- bug#8977: Parse error: Compile coreutils 8.9 with gcc 2.95.3,
Wolfgang Steinwender <=