Is this a bug?
Martin Kahlert
martin.kahlert@infineon.com
Tue Sep 10 00:12:00 GMT 2002
On Mon, Sep 09, 2002 at 03:05:02PM -0600, tromey@redhat.com wrote:
> >>>>> "Martin" == Martin Kahlert <martin.kahlert@infineon.com> writes:
>> >> I think this was fixed by this patch:
> >> [ omitted ]
>> Martin> Do you use the mainline? The hex bug happens with
> Martin> the snapshot 20020902 (and gcc-3.2 release).
> Martin> gcj -v says: gcc version 3.2.1 20020902 (prerelease)
Is it possible that this fix is only half of the truth?
Test this example:
public class hello
{
final static long a = 1000000000000L;
public static void main(String[] args)
{
long x = 1L;
int i;
for(i=0;i<12;i++)
x *= 10L;
System.out.println("a = " + a);
System.out.println("x = " + x);
}
}
With gcc version 3.2.1 20020902 (prerelease) it prints
on Linux
a = 0xe8d4a51000
x = 1000000000000
The difference is that the 'a = ' string is filled at compile time,
the other one at runtime. (gcj -S told me that).
I will try it with the 20020909 snapshot which is made from HEAD as
indicated by the announcement.
Thanks for your help
Martin.
--
The early bird catches the worm. If you want something else for
breakfast, get up later.
More information about the Java
mailing list