cent and ucent?

Stewart Gordon smjg_1998 at yahoo.com
Tue Jan 31 16:28:53 PST 2012


On 31/01/2012 18:47, Marco Leise wrote:
<snip>
> pragma(msg, real.sizeof);

Prints 10u for me (2.057, Win32).

> Prints the expected platform alignment for me:
>
> DMD64 / GDC64: 16LU
> DMD32: 12LU

That isn't alignment, that's padding built into the type.  I assume you're testing on 
Linux.  I've heard before that long double/real is 12 bytes under Linux because it 
includes 2 bytes of padding.  I don't know why Linux does it that way, but there you go.

Stewart.


More information about the Digitalmars-d mailing list