Record Alignment issue in macpas mode
Original Reporter info from Mantis: Adriaan van Os
-
Reporter name: Adriaan van Os
Original Reporter info from Mantis: Adriaan van Os
- Reporter name: Adriaan van Os
Description:
The following test program
{$mode macpas}
{$align mac68k}
program PatBug;
type
Pattern = array[ 0..7] of Byte;
PatRec = record b: boolean; p: Pattern end;
var
gPatRec: PatRec;
begin
writeln( 'SizeOf( PatRec) = ', SizeOf( PatRec));
writeln( 'Offset of p: pattern = ', PtrUInt( @gPatRec.p) - PtrUInt( @gPatRec))
end.
returns a size of 9 and an offset of 1 with FPC. With CodeWarrior Pascal, the values are 10 and 2 respectively, both with $align macpas and $align power.
Mantis conversion info:
- Mantis ID: 15061
- OS: Mac OS X
- OS Build: 10.5
- Build: svn trunk 14144
- Platform: Darwin
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 14577 (#9cc211e8)