classpath
[Top][All Lists]
Advanced

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

bug in >>> operator?


From: Emile Snyder
Subject: bug in >>> operator?
Date: 10 Sep 2002 02:26:38 -0700

Hi all,

I'm using the 1.0.3 version of sablevm, and it's associated classpath. 
I haven't managed to get a CVS-checked-out version of classpath up and
running with any VM yet.  If this is fixed in the tree, or simply a VM
issue I apologize in advance.

The >>>= and >>> operators appear to be broken strangely.  Demo class
and output:

==============================================================
import java.lang.*;
import java.awt.color.*;
import java.awt.image.*;

public class ShiftBug {
    public static void main (String argv[]) 
    {
        long a = 0xff00;
        long b, c;

        b = a >>> 4;
        c = 0xff00 >>> 4;
        System.out.print (Long.toString(b,16) + " " + Long.toString(c,16) + 
"\n");
    }
}
===================================================

Output:

address@hidden esnyder]$ jikes -classpath /usr/local/lib/sablevm/classes-1.0.3 
ShiftBug.java
address@hidden esnyder]$ sablevm -Y ShiftBug
ff000 ff0

thanks,
-emile






reply via email to

[Prev in Thread] Current Thread [Next in Thread]