libffi test

Bryce McKinlay bryce@waitaki.otago.ac.nz
Thu Feb 7 14:59:00 GMT 2002


Andreas Tobler wrote:

>With a binary and with sun java I get this (as expected):
>
>[titanium:~] andreast% ./my_sqrt
>sqrt_int: 0
>sqrt_double: NaN
>sqrt_long: 0
>
>Doing it with gij I get the following:
>
>[titanium:~] andreast% gij my_sqrt
>sqrt_int: -2147483648
>sqrt_double: NaN
>sqrt_long: -9223372034707292160
>
>Is this obviously a problem in the libffi ? Or somewhere else?
>
>One strange thing I see is, the integer is the biggest negativ one
>defined. The long on the otherside is not the biggest negativ one. (-9223372036854775808)
>---
>So is this to worry about? 
>

Oh, I forgot about this. This is (I think) an endian bug in libjava 
and/or gcj -C, and occurs on Linux PPC as well. I'm not sure exactly 
where the problem is here but I'm pretty sure it isn't libffi.

regards

Bryce.




More information about the Gcc mailing list