[fpc-devel] Alignment question

Florian Klämpfl florian at freepascal.org
Sun Nov 20 21:18:14 CET 2011


Am 20.11.2011 21:11, schrieb Jonas Maebe:
> 
> On 20 Nov 2011, at 21:04, Florian Klämpfl wrote:
> 
>> So declaring the type once with the right recordaligmax should be 
>> sufficient?
> 
> recordalignmax does not mean that a type will be aligned to a
> multiple of that value. It only means that it will be aligned to that
> value *if* it contains any fields that need such an alignment. E.g.,
> if you are on a system where double is defined as preferring 8-byte
> alignment and a record contains a double field, then recordalignmax=4
> will result in that record nevertheless getting aligned to 4 bytes,
> but recordalignmax=8 or recordalignmax=16 or any other value >= 8
> means that it will be aligned to 8 bytes.

Sorry, I meant recordalignmin.




More information about the fpc-devel mailing list