[fpc-pascal] _Release call location for unused function results

Maciej Izak hnb.code at gmail.com
Tue Jan 30 14:06:08 CET 2018


2018-01-30 8:34 GMT+01:00 Michael Van Canneyt <michael at freepascal.org>:

> The question is whether Delphi's behaviour is intentional.


Sadly it is intentional (but undocumented), the facts:

* Barry Kelly compiler guy post
* Works with all known Delphi versions
* I've checked this for NG compiler - also works like in classic Delphi
(especially this point means that the "feature" is intentional )

Seems like the SCOPEDINTERFACEDESTROY mode-switch is necessary. The
question is:

would we like to enabling this for all Delphi modes?

the approach with "with" for "scoping" seems more proper even in Delphi
mode. Probably SCOPEDINTERFACEDESTROY should stay off for all modes
including Delphi modes.

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180130/8220b65e/attachment.html>


More information about the fpc-pascal mailing list