[fpc-devel] CompareValue
Vincent Snijders
vsnijders at quicknet.nl
Sun Mar 4 10:18:20 CET 2007
C Western schreef:
> Пётр Косаревский wrote:
>>> In the math unit are the CompareValue functions only for signed
>>> integers. Why not for DWORD and QWORD?
>>
>> I guess, that it's Delphi mimicing implementation (because it is
>> Delphi-like).
>>
>> And it can be tricky to distinguish signed and unsigned expression
>> values.
>>
>> Like,
>> a: qword;
>> a-1 --- ??? (anyone may know for sure that a-1>0 and want to subtract
>> one)
>>
>> I guess it's something like that.
>
> If you check <http://www.freepascal.org/mantis/view.php?id=8448> you can
> see this bug in action - the fpcadds and math unit provide signed and
> unsigned versions of CompareValue, but the correct one is not always
> chosen.
>
What a lousy compiler we use! ;-)
Do you have a testprogram, so I can make a fpc bug report?
Vincent
More information about the fpc-devel
mailing list