[fpc-devel] Const optimization is a serious bug

Alexander Klenin klenin at gmail.com
Mon Jul 11 13:16:24 CEST 2011


On Mon, Jul 11, 2011 at 15:35, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> Alexander Klenin schrieb:
>>> To which data type do you want apply your "constval" modifier, with which
>>> concrete effects?
>>
>> To any datatype, of course. The result should be:
>> 1) Parameter is passed by value
>
> How to pass objects by value?
That, as I said above, is a separate good question.
Until it is resolved, I agree with your suggestion of giving warning
(or even error) on "const" and "constval" object parameters.

> Records with embedded AnsiStrings or other managed types?
That is already done in the usual by-value mechanism.

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list