Assignment of Inf/NaN constant does not compile with {$overflowchecks on}
Original Reporter info from Mantis: Gorelkin
-
Reporter name: Sergei Gorelkin
Original Reporter info from Mantis: Gorelkin
- Reporter name: Sergei Gorelkin
Description:
Just as the subject says, and it's probably by design, but:
- Documentation says that {$overflowchecks on} is for checking overflows of integer operations, but this is a floating-point assignment.
- The error message says "Range check while evaluating constants" - the same one that is emitted with {$rangechecks on}, which is also somewhat confusing.
- The NaN/Inf constants are typically being used on purpose; to have code using them run, one also has to adjust the FPU exception mask. Having to disable three checks (rangecheck, overflowcheck, exception mask) for mere using of a constant seems a bit over the limit.
Mantis conversion info:
- Mantis ID: 14757
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 15765 (#0085c22c)