On 18/09/2022 11:37, Bart via fpc-devel wrote:
Hi,

The following program will compile for Windows 32 and 64 bit.
It fails to compile for Linix 64 bit (and if I understand correctly,
also for MacOS 64 bit).


Just enable fpc_math_samevalue_bug

{$if FPC_FullVersion=30202}{$ifdef Win64}
  {$define fpc_math_samevalue_bug}
{$endif}{$endif}


Make it
{$if FPC_FullVersion<=30202}
  {$define fpc_math_samevalue_bug}
{$endif}

--------------------
I wonder anyway

  TCustomSpinEditEx = class(specialize TSpinEditExBase<Int64>)

But "SameValue" does not exist for int64 (or any int)?
So I assume the compiler converts the int to a float for calling SameValue => that seems undesirable.

So we should have a function (in the scope for the generic)

    function SameValue(AValue1, AValue2: Int64): Boolean; overload;
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to