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

2018-01-30 Thread Florian Klämpfl
Am 30.01.2018 um 15:07 schrieb Maciej Izak: > 2018-01-30 14:40 GMT+01:00 Marco van de Voort >: > > Have you tested this with large methods? The trouble is we only get > reports/code from people for whom the hack succeeded, not from ones that >

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

2018-01-30 Thread Sven Barth via fpc-pascal
Am 30.01.2018 15:07 schrieb "Maciej Izak" : > > question is: would we like to enabling this for all Delphi modes? > > Everything that needs this is essentially feature abuse. I would not enable > it by default +1 . Anyway I am still considering : commit or not :P. While

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

2018-01-30 Thread Maciej Izak
2018-01-30 14:40 GMT+01:00 Marco van de Voort : > Have you tested this with large methods? The trouble is we only get > reports/code from people for whom the hack succeeded, not from ones that > tried and failed. > > I can remember from one of the bugreports or mail threads about

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

2018-01-30 Thread Marco van de Voort
In our previous episode, Maciej Izak said: > > 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

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

2018-01-30 Thread Maciej Izak
2018-01-30 8:34 GMT+01:00 Michael Van Canneyt : > 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

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

2018-01-29 Thread Michael Van Canneyt
On Mon, 29 Jan 2018, Zoë Peterson wrote: In the code below Bar creates a reference counted object and returns an interface to it. Foo calls Bar but doesn't assign the result anywhere. In Delphi, this produces the result: Foo > TAutoRelease.Create Foo < TAutoRelease.Destroy But in

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

2018-01-29 Thread Maciej Izak
2018-01-29 23:32 GMT+01:00 Zoë Peterson : > Is Free Pascal's behavior intentional? Can it be changed to match Delphi? > the topic is well known. I have plan to add new modeswitch for that: SCOPEDINTERFACEDESTROY If you like you can try existing patch:

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

2018-01-29 Thread Graeme Geldenhuys
On 2018-01-29 22:32, Zoë Peterson wrote: Is Free Pascal's behavior intentional? Can it be changed to match Delphi? Something I've queried with the FPC developers some 10 years ago. The Delphi behaviour is undocumented, so developers are relying on a implementation detail that could change

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

2018-01-29 Thread Zoë Peterson
In the code below Bar creates a reference counted object and returns an interface to it. Foo calls Bar but doesn't assign the result anywhere. In Delphi, this produces the result: Foo > TAutoRelease.Create Foo < TAutoRelease.Destroy But in Free Pascal it produces this: Foo >