Bill Allombert on Wed, 11 Dec 2002 12:42:23 +0100

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

Re: conflicting declarations

On Tue, Dec 10, 2002 at 08:39:19PM -0500, Michael Somos wrote:
> pari-dev,
>      I got the latest CVS and encountered this problem :
> ==========================================================================
> Shall we try to build pari 2.2.5 (development CHANGES-) now (y/n)? [n]
> Ok. Type "cd Osolaris-sparcv9.dbg; make install" when you are ready
> Bye !
> danube:/tmp/local/pari> cd Osolaris-sparcv9.dbg
> danube:/tmp/local/pari/Osolaris-sparcv9.dbg> date;make install;date
> Tue Dec 10 20:28:27 EST 2002
> /usr/ccs/bin/as -P -I. -D__GNUC__ -T -o kernel.o ../src/kernel/sparcv8/level0_sp
> arcv8_micro.S
> cat ../src/kernel/sparcv8/level0.h ../src/kernel/none/level1.h > pariinl.h
> /usr/local/bin/gcc  -c -DMEMSTEP=1048576 -g -Wall -Wno-implicit   -DBOTH_GNUPLOT
> _AND_X11 -I. -I../src/headers -o mp.o ../src/kernel/none/mp.c
> ../src/kernel/none/mp.c:25: conflicting declarations of `overflow'
> pariinl.h:59: `overflow' previously declared here
> ../src/kernel/none/mp.c:26: conflicting declarations of `hiremainder'
> pariinl.h:58: `hiremainder' previously declared here
> make: *** [mp.o] Error 1

My fault. I have commit the patch for darwin/ANSI C without testing sparc.

The problem is a bit strange:
in src/kernel/sparcv8/level0.h there is

#else /* ASMINLINE */

register ulong hiremainder __asm__("%g5");
register ulong overflow __asm__("%g6");

So hiremainder and overflow are neither static nor extern, they
live in registers and are shared by every files.

I suppose level0.h n this case need to define 
and then adding 
ulong hiremainder
in mp.c

Anyone has a better idea ?