[Top][All Lists]

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

bug#9380: Compilation problems with coreutils-8.9

From: Rob McMahon
Subject: bug#9380: Compilation problems with coreutils-8.9
Date: Tue, 30 Aug 2011 12:46:06 +0100
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:6.0) Gecko/20110814 Thunderbird/6.0

On 26/08/2011 17:29, Paul Eggert wrote:
Can't you compile with the -xc99 option?  The Sun documentation says it's
supported, even with that old compiler:


'configure' should have deduced the -xc99 option for you; it tries
'-xc99=all' early on.  Does that not work for you?  The documentation
says '-xc99=%all' is required, but as I recall, the '%' was optional
even way back when.

That doesn't seem to be quite enough unfortunately:

> cc -V
cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-12 2003/05/18
> dirs
> make -n heap.o
echo "  CC      " heap.o;source='heap.c' object='heap.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \
cc  -I.   -D_REENTRANT   -O -xc99=%all -c -o heap.o heap.c
> make heap.o
  CC       heap.o
"heap.c", line 99: syntax error before or at: void
"heap.c", line 103: undefined symbol: top
"heap.c", line 103: warning: improper pointer/integer combination: op "="
cc: acomp failed for heap.c
make: *** [heap.o] Error 2
Exit 2
> sed -n '96,103p' heap.c
  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;

If you look at the list of supported C99 features, it's:

 * *C99 Keywords*
 * *__func__* *Support*
 * *Variable Length Arrays*
 * *inline* *Specifier For Static Functions*
 * *Commenting Code With //*

No mixing of declarations with statements. Ah well, this should be the last time I have to do this.


E-Mail: address@hidden          PHONE:  +44 24 7652 3037
Rob McMahon, IT Services, Warwick University, Coventry, CV4 7AL, England

reply via email to

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