"Walter Bright" <newshou...@digitalmars.com> wrote in message news:hbo5il$2sn...@digitalmars.com... > AJ wrote: >> How can/does D guarantee that "int" will always be 32 bits on all >> platforms? > > The implementation on a platform must implement it that way. > >> Does this mean that D won't work on some platforms? > > You can make anything work on any platform
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 };