int always 32 bits on all platforms?
AJ
aj at nospam.net
Thu Oct 22 20:21:10 PDT 2009
Walter Bright wrote:
> AJ wrote:
>> How do you make ABC below work on a platform that requires 32-bit
>> integers to be aligned on 32-bit boundaries while keeping the
>> layount and size of ABC the same as on a platform that has no such
>> alignment requirement? struct ABC
>> {
>> byte a;
>> int b; // may be improperly aligned on some platforms
>> int64 c; // same issue
>> };
>
> You don't require the layout or size of ABC to be the same on all
> platforms. C doesn't require it, why should D?
I know I was asking for the impossible, I just second-guess myself about
some things (especially at the hardware level).
More information about the Digitalmars-d
mailing list