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

fredvs fiens at hotmail.com
Sun Feb 2 04:22:03 CET 2020

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.

This function is used in additempo() function, used mainly in the
msestat.pas file.
This is used to restore, for example, the position and size of windows.

To fix with a turn-around, I did first compile mseide with fpc 3.2.0 to know
what is the value of dynarrayelesize(typeinfo).
It is always 16 and then I use that constant instead of

It works like charm and can use now fpc 3.3.1 without problems.

Great but, for the Champions, would it be somebody that can explain why the
result is always = 0 from rev 42375 ?

Here the problematic function:

function dynarrayelesize(const typinfo: pdynarraytypeinfo): sizeint; inline;
 ti: pdynarraytypeinfo;
 ti:= typinfo;
{$ifdef FPC}
 ti:= aligntoptr(ti);
 result:= psizeint(ti)^;
 result:= ti^.elsize;

Many thanks ;-)
Sent from: http://free-pascal-general.1045716.n5.nabble.com/

More information about the fpc-pascal mailing list