Irix6.5: Printing Long Doubles

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Sun Jun 3 12:44:00 GMT 2001


Jeffrey Oldham <oldham@codesourcery.com> writes:

>     machine> ./a.out 
>     4.94066e-324
>     1.2
>     machine>
> 
> This is a regression from g++ 2.8.1.  Is anyone else seeing this
> difficulty?

I'm pretty sure I know what's going on here: while g++ 2.8.1/gcc 2.95 and
their corresponding versions of libstdc++ v2 used libio for I/O, libstdc++
v3 currently uses the vendors' stdio.  SGI switched to using 128-bit long
double in the N32 and N64 ABIs, which gcc doesn't support yet; see
config/mips/abi64.h:

/* ??? Unimplemented stuff follows.  */

/* ??? Add support for 16 byte/128 bit long doubles here when
   mips_abi != ABI32.  */

While both libio and the test program were compiled with g++, using the
same implementation of long double (i.e. 64 bits), now the vendor printf is
called, expecting an 128 bit long double, but only getting 64 bits ;-(

It's on my agenda to implement this, since it is probably a good way to
find one's way around gcc, and it should be possible to follow Richard
Henderson's lead implementing 128 bit xfloat support (also via libcalls)
for Tru64 UNIX V5.

Certainly nothing for GCC 3.0, though :-)

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE



More information about the Libstdc++ mailing list