[fpc-devel] Const optimization is a serious bug

Alexander Klenin klenin at gmail.com
Thu Jul 7 08:51:59 CEST 2011


On Thu, Jul 7, 2011 at 17:45, Florian Klaempfl <florian at freepascal.org> wrote:
>> Put in another words, current "const string" implementation honors the
>> implicit contract of
>> "adding const in front of the string parameter cancels refcounting",
>> at the cost of breaking the implicit contract of "refcounted values
>> are indistinguishable
>> from simple values (except maybe in performance)".
>
> As I have shown before in this thread, non ref. counted values e.g.
> shortstrings are affected by the same problem.

And as per Chad's reply (and agree with his logic), this is not so.

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list