Programmer’s guide: list of elimination of function calls “constant folding” incomplete
Original Reporter info from Mantis: kays @KaiBurghardt
-
Reporter name: Kai Burghardt
Original Reporter info from Mantis: kays @KaiBurghardt
- Reporter name: Kai Burghardt
Description:
§ “Constant folding” https://freepascal.org/docs-html/current/prog/progsu176.html only lists chr
, hi
, lo
, ord
, pred
, and succ
as function that may be eliminated at compile-time, even though all arithmetic internProcs are supported.
Additional information:
However, as I’ve noted in https://forum.lazarus.freepascal.org/index.php/topic,52066.msg383090.html#msg383090 function involving real values won’t work in type definitions, but that’s potentially a bug (point of inquiry on the list https://lists.freepascal.org/pipermail/fpc-devel/2020-November/043304.html).
Mantis conversion info:
- Mantis ID: 38050
- OS: GNU/Linux
- OS Build: 4.2.0
- Build: 3.2.0+dfsg-7 [2020/08/21]
- Platform: x86_64
- Version: 3.2.0