Irix6 casting long double to double yields bogus results
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Jan 29 19:26:00 GMT 2003
Alex,
I've been running some tests on irix6 floating point and noticed a
problem. Casting from long double to double seems to be broken now.
Thoughts?
Thanks,
--Kaveh
%cat foo.c
#include <stdio.h>
int main()
{
long double a = 1234.5678L, b = 1234.5678L;
double c = 1234.5678;
printf ("%f %Lf %f\n", (double) a, b, c);
return 0;
}
%gcc -v
Reading specs from /var/tmp/gcc-testing/branch/build/gcc/specs
Configured with: ../egcc-3.3-CVS20030129/configure --verbose
--enable-languages=c,objc,c++,f77,java
Thread model: single
gcc version 3.3 20030129 (prerelease)
%gcc -Wformat foo.c
%./a.out
1834810029.000000 1234.567800 1234.567800
More information about the Gcc-bugs
mailing list