This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Irix6.5: Printing Long Doubles


For gcc 3.0 and 3.1 on mips-sgi-irix6.5, printing long double values
yields garbage:

    #include <iostream>

    int
    main()
    {
      long double ld = 1.2;
      double d = ld;
      std::cout << ld << std::endl;
      std::cout << d << std::endl;
      return 0;
    }

    machine> ./a.out 
    4.94066e-324
    1.2
    machine>

This is a regression from g++ 2.8.1.  Is anyone else seeing this
difficulty?

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
#include <iostream>

int
main()
{
  long double ld = 1.2;
  double d = ld;
  std::cout << ld << std::endl;
  std::cout << d << std::endl;
  return 0;
}

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