[fpc-devel] Const optimization is a serious bug
Alexander Klenin
klenin at gmail.com
Sun Jul 10 18:59:54 CEST 2011
On Mon, Jul 11, 2011 at 04:09, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
>>> If you want to introduce different keywords, then please different for
>>> beforementioned cases. E.g.
>>> constval x: integer; //all value-types
>>> constref r: Trecord; //also ShortString
>>> const??? o: TObject; //all references, except following
>>> const??? s: AnsiString; //all managed types
>>
>> I am not quite sure what are you asking here. Can you elaborate?
>
> 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
2) Parameter modifications are forbidden by compiler
--
Alexander S. Klenin
More information about the fpc-devel
mailing list