C-style operators evaluate left operand twice
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
C-style operators += -= /= *= evaluate
exactly as if called with parameter repeated
i.e. they behave like C MACROS with double evaluation.
a += b; ==> a := a + b;
if a doesn't evaluate the same the second time around (because it's a dereferenced pointer from a function or because it's an array indexed by a function...) then you have a problem...
problem present in both 1.0.10 and 1.9.4
Additional information:
Reporter: Maciej Żenczykowski
EMail: maze at cela dot pl
Mantis conversion info:
- Mantis ID: 5349
- OS: Linux
- Version: 1.9.4
- Fixed in version: 1.9.5