This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Is this a bug?
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- To: java at gcc dot gnu dot org
- Date: Wed, 4 Sep 2002 14:59:22 +0200
- Subject: Is this a bug?
- Reply-to: martin dot kahlert at infineon dot com
Hi!
I got a strange result with gcj on linux here:
$ cat hello.java
public class hello
{
final static long a = 1000000000;
final static long b = 1000 * a;
public static void main(String[] args)
{
System.out.println("a = " + a);
System.out.println("b = " + b);
}
}
$ gcj -o hello hello.java --main=hello
$ ./hello
a = 1000000000
b = -727379968
$ javac hello.java
$ java hello
a = 1000000000
b = 1000000000000
$ gcj -v
Reading specs from /usr/local/snapshots/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
Reading specs from /usr/local/snapshots/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc-20020902/configure --prefix=/usr/local/snapshots
--enable-languages=f77,c++,java --disable-threads --enable-shared=libstdc++
Thread model: single
gcc version 3.2.1 20020902 (prerelease)
Any idea?
Thanks in advance,
Martin.
--
The early bird catches the worm. If you want something else for
breakfast, get up later.