Int64 arithmetic error on 32-bit platform
Original Reporter info from Mantis: kazalex
-
Reporter name: Kazantsev Alexey
Original Reporter info from Mantis: kazalex
- Reporter name: Kazantsev Alexey
Description:
program Project1;
function add(a, b : Integer) : Int64;
begin
result := Int64(a) * $FFFFFFFF + b;
end;
begin
writeLn(add(200210, 1)); // Linux x86_64: 859895402131951
// Windows i386: -200209
end.
Mantis conversion info:
- Mantis ID: 32046
- Build: 36506
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 37921 (#1934285c)