The What\'s New for Delphi XE2 contains the following.
Packed Now Forces Byte Alignment of Records
If you have legacy code that uses the
As I am not the Delphi compiler guy I can also mostly guess as others did: The record alignment might not be meant for aligning the members inside the record, but the record itself instead.
If you declare a record variable it is aligned to some address in memory, that is most likely aligned on a 4-byte boundary. This has been the case (as tested in D2007) for packed and unpacked records.
Now in XE2 a packed record is placed in a 1-byte boundary, while unpacked records are placed on some even boundary, which can be controlled by the align keyword. Like this:
type
TRecAligned = record
b1: byte;
u1: uint64;
end align 16;
TRecPackedAligned = packed record
b1: byte;
u1: uint64;
end align 16;
The packed record is still aligned on a 1-byte boundary while the unpacked record is aligned to a 16-byte boundary.
As I said, it is only a guess. The wording of the Embarcadero quote isn't that much clear on the suject.