Graeme Geldenhuys schrieb:
At that time I proposed this too and there was a valid reason not to
generate such code.
And that valid reason would be? I agree with Alexander and Mattias,
why can't the compiler generate such code behind the scenes?
IMO "such" code (with temporary variables) is not required at all. When
the implementation of Inc() is changed into kind of a macro (with
arguments), the compiler can expand Inc(x,y) into x:=x+y, and then all
existing optimizations become applicable to that code. According to my
experience with the C preprocessor I do *not* vote for macros with
arguments, in general, but in the case of compiler magics a little bit
more work would result in much more comfort to the users.
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus