[kaffe] [Bug in CVS version] (-1)/2 == -1 sometimes
Timothy Stack
stack@cs.utah.edu
Thu Mar 13 15:28:01 2003
> Hi all,
hi,
> With a current CVS version of Kaffe (compiled yesterday), the following
> program, compiled with Sun javac or kjc--
...
> gives me this output:
>
> > benja@joy:/tmp$ /usr/local/kaffe/bin/java -cp . Foo
> > 0
> > -1
CVS update and give it a try.
The problem was that the jitter was using arithmetic shift to do divide,
which doesn't quite work for signed integers. The fix is based on what
gcc generates and seems to work.
> Thanks,
> - Benja
thanks,
tim