This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Irix6 casting long double to double yields bogus results


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]