typinfo: push/pop doesn't save packrecords. also, always use AlignTypeData on m68k, which might have less than pointer sized (word, 2 byte) alignments in the typeinfo, because on most systems C compilers also use 2 byte alignments, so we need that for compatibility

git-svn-id: trunk@36594 -
This commit is contained in:
Károly Balogh 2017-06-24 23:18:12 +00:00
parent 41f72a0e6d
commit ea635bfda5

View File

@ -790,11 +790,15 @@ type
function aligntoptr(p : pointer) : pointer;inline;
begin
{$ifdef m68k}
result:=AlignTypeData(p);
{$else m68k}
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
result:=align(p,sizeof(p));
{$else FPC_REQUIRES_PROPER_ALIGNMENT}
result:=p;
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
{$endif m68k}
end;
@ -1007,14 +1011,13 @@ end;
Function AlignTypeData(p : Pointer) : Pointer;
{$push}
{$packrecords c}
type
TAlignCheck = record
b : byte;
q : qword;
end;
{$pop}
{$packrecords default}
begin
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
{$ifdef VER3_0}