Mail Archives: djgpp/1998/08/04/17:39:50
Guan Foo Wah wrote:
>
> I tried sizeof (long double) and it returns 12. I tried the same thing on
> MSC++ 7 and it returns 10.
>
> Why is this so ?? Is it because of the dword alignment ?
Yes. On x86, the long double is actually an 80-bit value (10 bytes).
But GCC pads with two additional bytes to keep each one on a dword
boundary. This is helpful to most processors, and can yield a
significant speed advantage.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -