Final bug of my day:

Final bug of my day:
https://quality.embarcadero.com/browse/RSP-20353

{$APPTYPE CONSOLE}
var
I: Integer;
U64: UInt64;
D: Double;
begin
I := 1;
U64 := $8000000000000000;
D := I * U64;
Writeln(D);

U64 := $7fffffffffffffff;
D := I * U64;
Writeln(D);

Readln;
end.

Under dcc32 all is well, the output is

9.22337203685478E+0018
9.22337203685478E+0018

but under dcc64 it all goes south

-9.22337203685478E+0018
9.22337203685478E+0018

Looks like the compiler authors still haven't found all the parts of the code that treat UInt64 as though it were Int64.

All these bugs (5 reports, but more bugs) from one simple SO question yesterday about StrToFloat........


https://quality.embarcadero.com/browse/RSP-20353

Comments

  1. I have my doubts that the bugs will ever be fixed now that Allen Bauer and the Borland compiler team got fired. No expertise available.

    ReplyDelete
  2. Ralf Stocker Er, this one has already been fixed.....

    ReplyDelete
  3. Ralf Stocker Delphi compiler person is still the same that has been for years. And Allen Bauer has not worked on the compiler itself for years afaik.

    ReplyDelete

Post a Comment