[fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

Martin Frb lazarus at mfriebe.de
Sun Feb 2 06:02:46 CET 2020


On 02/02/2020 04:22, fredvs via fpc-pascal wrote:
> Hello everybody.
>
> Good time to go back with that problem and fix it forever the right way!
> The problem is isolated and is fixed "hardcoded".
>
>  From rev 42375, in msegui function dynarrayelesize(const typinfo:
> pdynarraytypeinfo): sizeint; inline;
> the result is always = 0.
>

I do not know if fpc has an official way to get the size of an array 
element from the typeinfo.

But comparing the internals:
{$ifdef VER3_0}
       typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
{$else VER3_0}
       typeInfo:=aligntoqword(typeInfo+2+PByte(typeInfo)[1]);
{$endif VER3_0}

So alignment changed, which is why the old code no longer works

mse always does

  ti:= aligntoptr(ti);



More information about the fpc-pascal mailing list