GNU bug report logs - #8977
Parse error: Compile coreutils 8.9 with gcc 2.95.3

Previous Next

Package: coreutils;

Reported by: Wolfgang Steinwender <wolfgang <at> psysteme.de>

Date: Fri, 1 Jul 2011 16:17:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Wolfgang Steinwender <wolfgang <at> psysteme.de>
To: 8977 <at> debbugs.gnu.org
Subject: bug#8977: Parse error: Compile coreutils 8.9 with gcc 2.95.3
Date: Fri, 01 Jul 2011 10:43:54 +0200
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




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.