This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BigInteger compile fails


On Mon, 14 Feb 2000, Matt Welsh wrote:

> > Either the latest egcs, or 2.95.2 with Bryce's compatibility patch.
> 
> I was using Bryce's patch. There must be something else wrong with 2.95.2
> then?

There's an easy workaround in the BigInteger source code.  If you can't find 
the right compiler fix, go ahead and apply this in the meantime.
--warrenl


--- BigInteger.java	Mon Feb 14 02:01:31 2000
+++ BigInteger.java.workaround	Tue Feb 15 15:29:14 2000
@@ -279,7 +279,10 @@ public class BigInteger extends Number i
 
   private final boolean isNegative()
   {
-    return (words == null ? ival : words[ival - 1]) < 0;
+    // FIXME: compiler error in egcs-19991214 when compiling to bytecode (only).
+    // return (words == null ? ival : words[ival - 1]) < 0;
+    int tmp = (words == null ? ival : words[ival - 1]);
+    return tmp < 0;
   }
 
   public int signum()

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]