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

Re: Size of (long double) ??



On Wed, Feb 02, 2000 at 10:02:20AM +0000, Jose Rodriguez wrote:
> The last line says sizeof(long double) is 8, the same as type (double).
> This is
> a bit  "short" for this type (even in the i386, this program reports
> sizeof(long double)
> is 12).

Yes, but unfortunately it's correct.  DEC Unix has 128-bit long doubles but
this is done in software (and in fact ccc does not support them on Linux
either).

Along the same lines, 'long long int' is also 64 bits on alpha, which tends
to confuse people, like the glib/gtk+ maintainers :)

> Under xxgdb on Debian-Alpha, the command
> 
> (xxgdb)  display sizeof(long double)
> 
> shows the size of this type is 16 (I think this is the right one).

Hm, that looks like a bug.

> Since Alpha system is new to me, any comment about this issue would be
> appreciated.
> ¿How can size of "double" and "long double" be the same?

Falk has answered that question - the Alpha FPU (like the PowerPC FPU) is a
64-bit unit, rather than an 80-bit unit (as the i386 and m68k ones are).
Chalk this up to the RISC/CISC divide :)


Reply to: