BigInteger build problem - again

Warren Levy warrenl@cygnus.com
Wed Apr 26 16:47:00 GMT 2000


On Wed, 26 Apr 2000, Matt Welsh wrote:

> I am building the latest CVS libgcj using gcc-2.95.2 with Bryce's
> latest patch (2000-04-18). However, I get the following error 
> while compiling libgcj:

I know this skirts around the issue of the compiler problem you're
questioning, but if you (or anyone else) want(s) to workaround this
failure at the libgcj level, you can simply apply this patch to the
isNegative method in BigInteger.java:


@@ -148,7 +147,10 @@ public class BigInteger /* FIXME: extend
 
   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()


Hope this helps!
--warrenl



More information about the Java mailing list