[fpc-devel] ConvUtils: ConvTypeToFamily and ConvFamilyToDescription conundrums

Bart bartjunk64 at gmail.com
Wed Jun 8 14:58:21 CEST 2022


On Wed, Jun 8, 2022 at 11:43 AM Bart <bartjunk64 at gmail.com> wrote:
>
> And another observation: on Delphi 7 TConvType seems to be unsiged (in
> fpc it's signed).

And as a consequence compilation in Delphi fails if a negative value
is supplied to a function that takes a TConvType as a parameter, but
also code like this will not raise an exception Delphi, while it does
in Fpc:

var
  L: Integer;
begin
  L:=-1;
  writeln('ConvTypeToDescription(L)=',ConvTypeToDescription(L));  //
prints [$0000FFFF] in D7, EAccessViolation in fpc
end.


-- 
Bart


More information about the fpc-devel mailing list