public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: BigInteger compile fails
  2000-04-01  0:00 ` Tom Tromey
@ 2000-04-01  0:00   ` Matt Welsh
  2000-04-01  0:00     ` Warren Levy
  2000-04-01  0:00     ` Tom Tromey
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Welsh @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Tom Tromey; +Cc: java-discuss

> 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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BigInteger compile fails
  2000-04-01  0:00 BigInteger compile fails Matt Welsh
  2000-04-01  0:00 ` Tom Tromey
@ 2000-04-01  0:00 ` Per Bothner
  1 sibling, 0 replies; 7+ messages in thread
From: Per Bothner @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Matt Welsh; +Cc: java-discuss

Matt Welsh <mdw@cs.berkeley.edu> writes:

> Trying to compile the latest libgcj from CVS, using gcj 2.95.2, I get the
> following error:
> ...
> I presume this has been fixed in a later egcs? Any suggestion on which one
> I should try?

As a general rule, if you use libgcj from cvs, you should use gcj
also from cvs.

Some (but to a lesser extent) libstdc++ and g++.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BigInteger compile fails
  2000-04-01  0:00   ` Matt Welsh
@ 2000-04-01  0:00     ` Warren Levy
  2000-04-01  0:00       ` Matt Welsh
  2000-04-01  0:00     ` Tom Tromey
  1 sibling, 1 reply; 7+ messages in thread
From: Warren Levy @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Matt Welsh; +Cc: Tom Tromey, java-discuss

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()

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BigInteger compile fails
  2000-04-01  0:00     ` Warren Levy
@ 2000-04-01  0:00       ` Matt Welsh
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Welsh @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Warren Levy; +Cc: Tom Tromey, java-discuss

Just to follow up on this - everything seems to work fine with the 
latest egcs from CVS. 

Cheers -
Matt Welsh

Warren Levy <warrenl@cygnus.com> writes:
> 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 (on
> ly).
> +    // return (words == null ? ival : words[ival - 1]) < 0;
> +    int tmp = (words == null ? ival : words[ival - 1]);
> +    return tmp < 0;
>    }
>  
>    public int signum()

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BigInteger compile fails
  2000-04-01  0:00 BigInteger compile fails Matt Welsh
@ 2000-04-01  0:00 ` Tom Tromey
  2000-04-01  0:00   ` Matt Welsh
  2000-04-01  0:00 ` Per Bothner
  1 sibling, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Matt Welsh; +Cc: java-discuss

Matt> Trying to compile the latest libgcj from CVS, using gcj 2.95.2

This won't work.

Matt> I presume this has been fixed in a later egcs? Any suggestion on
Matt> which one I should try?

Either the latest egcs, or 2.95.2 with Bryce's compatibility patch.

Tom



^ permalink raw reply	[flat|nested] 7+ messages in thread

* BigInteger compile fails
@ 2000-04-01  0:00 Matt Welsh
  2000-04-01  0:00 ` Tom Tromey
  2000-04-01  0:00 ` Per Bothner
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Welsh @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

Trying to compile the latest libgcj from CVS, using gcj 2.95.2, I get the
following error:

java/math/BigInteger.java: In class `java.math.BigInteger':
java/math/BigInteger.java: In method `isNegative()':
java/math/BigInteger.java:282: internal error - SP mismatch

I presume this has been fixed in a later egcs? Any suggestion on which one
I should try?

Matt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BigInteger compile fails
  2000-04-01  0:00   ` Matt Welsh
  2000-04-01  0:00     ` Warren Levy
@ 2000-04-01  0:00     ` Tom Tromey
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Matt Welsh; +Cc: Tom Tromey, java-discuss

>> Either the latest egcs, or 2.95.2 with Bryce's compatibility patch.

Matt> I was using Bryce's patch. There must be something else wrong
Matt> with 2.95.2 then?

It could be that libgcj needs a more recent version of gcj than the
one in Bryce's patch.  I don't think he's updated it to keep track of
all the gcj fixes that have happened.

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-01  0:00 BigInteger compile fails Matt Welsh
2000-04-01  0:00 ` Tom Tromey
2000-04-01  0:00   ` Matt Welsh
2000-04-01  0:00     ` Warren Levy
2000-04-01  0:00       ` Matt Welsh
2000-04-01  0:00     ` Tom Tromey
2000-04-01  0:00 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).