Bill Allombert on Wed, 11 Dec 2002 14:34:51 +0100


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

Re: conflicting declarations


On Wed, Dec 11, 2002 at 12:42:23PM +0100, Bill Allombert wrote:
> On Tue, Dec 10, 2002 at 08:39:19PM -0500, Michael Somos wrote:
> > ../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

Thanks again for your report.

> 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");
> 
> Anyone has a better idea ?

Well, in the meantime, here a patch:

Index: src/kernel/none/mp.c
===================================================================
RCS file: /home/megrez/cvsroot/pari/src/kernel/none/mp.c,v
retrieving revision 1.95
diff -u -r1.95 mp.c
--- src/kernel/none/mp.c	2002/12/10 19:17:13	1.95
+++ src/kernel/none/mp.c	2002/12/11 13:29:48
@@ -22,8 +22,12 @@
 /* version (#ifdef __M68K__) since they are defined in mp.s   */
 #include "pari.h"
 
+#ifndef REGISTER_OVERFLOW
 ulong overflow;
+#endif
+#ifndef REGISTER_HIREMAINDER
 ulong hiremainder;
+#endif
 
 /* NOTE: arguments of "spec" routines (muliispec, addiispec, etc.) aren't
  * GENs but pairs (long *a, long na) representing a list of digits (in basis
Index: src/kernel/sparcv8/level0.h
===================================================================
RCS file: /home/megrez/cvsroot/pari/src/kernel/sparcv8/level0.h,v
retrieving revision 1.3
diff -u -r1.3 level0.h
--- src/kernel/sparcv8/level0.h	2000/11/03 21:00:27	1.3
+++ src/kernel/sparcv8/level0.h	2002/12/11 13:29:48
@@ -34,6 +34,8 @@
 #define SAVE_OVERFLOW
 #define LOCAL_HIREMAINDER
 #define SAVE_HIREMAINDER
+#define REGISTER_OVERFLOW
+#define REGISTER_HIREMAINDER
 
 BEGINEXTERN
 extern long divll(ulong x, ulong y);

Cheers,
Bill.