diff --git a/components/jitclasses/demo/unit1.pas b/components/jitclasses/demo/unit1.pas index 1b7e64f173..945b5025b6 100644 --- a/components/jitclasses/demo/unit1.pas +++ b/components/jitclasses/demo/unit1.pas @@ -267,12 +267,20 @@ begin end; type - tmethodnamerec = packed record + tmethodnamerec = +{$if (FPC_FULLVERSION<30301) or NOT defined(FPC_REQUIRES_PROPER_ALIGNMENT)} + packed +{$endif} + record name : pshortstring; addr : codepointer; end; - tmethodnametable = packed record + tmethodnametable = +{$if (FPC_FULLVERSION<30301) or NOT defined(FPC_REQUIRES_PROPER_ALIGNMENT)} + packed +{$endif} + record count : dword; entries : packed array[0..0] of tmethodnamerec; end; diff --git a/designer/jitforms.pp b/designer/jitforms.pp index a0378d5bc0..cae099d12a 100644 --- a/designer/jitforms.pp +++ b/designer/jitforms.pp @@ -386,12 +386,20 @@ const type // these definitions are copied from typinfo.pp - TMethodNameRec = packed record + TMethodNameRec = +{$if (FPC_FULLVERSION<30301) or NOT defined(FPC_REQUIRES_PROPER_ALIGNMENT)} + packed +{$endif} + record Name : PShortString; Addr : Pointer; end; - TMethodNameTable = packed record + TMethodNameTable = +{$if (FPC_FULLVERSION<30301) or NOT defined(FPC_REQUIRES_PROPER_ALIGNMENT)} + packed +{$endif} + record Count : DWord; // for runtime range checking it is important to give a range Entries : packed array[0..1000000] of TMethodNameRec; diff --git a/lcl/widgetset/wslclclasses.pp b/lcl/widgetset/wslclclasses.pp index e090e12304..89de72ce0e 100644 --- a/lcl/widgetset/wslclclasses.pp +++ b/lcl/widgetset/wslclclasses.pp @@ -204,12 +204,20 @@ begin end; type - TMethodNameTableEntry = packed record + TMethodNameTableEntry = +{$if (FPC_FULLVERSION<30301) or NOT defined(FPC_REQUIRES_PROPER_ALIGNMENT)} + packed +{$endif} + record Name: PShortstring; Addr: Pointer; end; - TMethodNameTable = packed record + TMethodNameTable = +{$if (FPC_FULLVERSION<30301) or NOT defined(FPC_REQUIRES_PROPER_ALIGNMENT)} + packed +{$endif} + record Count: DWord; Entries: packed array[0..9999999] of TMethodNameTableEntry; end;