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

Re: Problem with the MiNT library, -m68020



> I recently was working with a program that uses floating point math.
> I discovered that it worked correctly if compiled without -m68020, but
> if compiled with -m68020 -lgnu020, I got some really strange behavior:
> 
> int
> main()
> {
>   double d;
>   int i = 200;
>   d = (double) i;
>   printf("%f\n", d);
> }
> 
> ...yields output of 0.0.

Hmm. when I try it, it gives 200.000000
This is with cgcc -m68020 -lgnu020, with or without -m68881.
cgcc is gcc 2.5.8 compiled with a little change to enable gcc's floating
point emulator (whatever that is), which got rid of some errors or
warnings (I forget) when enabling the 'long double' support.
gnu020 is MiNTlibs pl45.

So, which versions of gcc and the libs did you use?

> Cheers,
> entropy

Bart.
-- 
  /                           Bart Schuller                            \
 /P.B.Schuller@TWI.TUDelft.NL               webmaster@www.twi.tudelft.nl\
<a href=http://www.twi.tudelft.nl/People/P.B.Schuller.html>My WWW page</a>
 \                talk schuller@ind156b.wi.leidenuniv.nl                /