Re: [fpc-devel] Improper OUT usage.

2013-03-12 Thread Flávio Etrusco
On Mon, Mar 11, 2013 at 3:44 AM, Jonas Maebe wrote: > > On 10 Mar 2013, at 22:08, Sven Barth wrote: > >> On 10.03.2013 20:39, Flávio Etrusco wrote: >>> I'd really like the compiler would stop with an error if it can't >>> prove a variable/out/result is initialized. >>> Did anybody try implementing

Re: [fpc-devel] Improper OUT usage.

2013-03-11 Thread Flávio Etrusco
On Mon, Mar 11, 2013 at 3:07 AM, Sven Barth wrote: > Am 11.03.2013 02:31 schrieb "Flávio Etrusco" : > >> On Sun, Mar 10, 2013 at 6:08 PM, Sven Barth >> wrote: >> > (...) >> > TTest = record >> > t: LongInt; >> > end; >> > var >> > t: TTest; >> > begin >> > FillChar(t, SizeOf(t), 0); >

Re: [fpc-devel] Improper OUT usage.

2013-03-11 Thread Hans-Peter Diettrich
Jonas Maebe schrieb: On 10 Mar 2013, at 22:08, Sven Barth wrote: On 10.03.2013 20:39, Flávio Etrusco wrote: I'd really like the compiler would stop with an error if it can't prove a variable/out/result is initialized. Did anybody try implementing this in FPC? Have fun fixing the errors then:

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Jonas Maebe
On 10 Mar 2013, at 22:08, Sven Barth wrote: > On 10.03.2013 20:39, Flávio Etrusco wrote: >> I'd really like the compiler would stop with an error if it can't >> prove a variable/out/result is initialized. >> Did anybody try implementing this in FPC? > > Have fun fixing the errors then: I though

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Sven Barth
Am 11.03.2013 02:31 schrieb "Flávio Etrusco" : > > On Sun, Mar 10, 2013 at 6:08 PM, Sven Barth wrote: > > On 10.03.2013 20:39, Flávio Etrusco wrote: > >> > >> I'd really like the compiler would stop with an error if it can't > >> prove a variable/out/result is initialized. > >> Did anybody try imp

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Flávio Etrusco
On Sun, Mar 10, 2013 at 6:08 PM, Sven Barth wrote: > On 10.03.2013 20:39, Flávio Etrusco wrote: >> >> I'd really like the compiler would stop with an error if it can't >> prove a variable/out/result is initialized. >> Did anybody try implementing this in FPC? > > > Have fun fixing the errors then:

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Sven Barth
On 10.03.2013 20:39, Flávio Etrusco wrote: On Sun, Mar 10, 2013 at 11:56 AM, Marco van de Voort wrote: In our previous episode, Vincent Snijders said: So be careful if you use OUT with types that have range limitations. Not setting the out parameter can make debug tools like gttt difficult.

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Flávio Etrusco
On Sun, Mar 10, 2013 at 11:56 AM, Marco van de Voort wrote: > In our previous episode, Vincent Snijders said: >> > So be careful if you use OUT with types that have range limitations. Not >> > setting the out parameter can make debug tools like gttt difficult. >> > >> >> You found a big in fcp-pas

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Marco van de Voort
In our previous episode, Vincent Snijders said: > > So be careful if you use OUT with types that have range limitations. Not > > setting the out parameter can make debug tools like gttt difficult. > > > > You found a big in fcp-passrc, because if you have an out parameter, > then the callee has to

Re: [fpc-devel] Improper OUT usage.

2013-03-10 Thread Vincent Snijders
2013/3/9 Marco van de Voort : > > the first problem is that fcl-passrc likes to use OUT for all kinds of > parameters, probably to silence some warnings. > > BUT at the same time doesn't assign a value to it in all codepaths (in this > case the visibility checking methods). At the same time, it pa

[fpc-devel] Improper OUT usage.

2013-03-09 Thread Marco van de Voort
I was debugging a problem in the generation of FCL documentation (CHM format) with fpdoc (trunk), and found an interesting behaviour worth of sharing; The location of the exception didn't seem to give much info, so I hoped to force problems to lead to early fails by recompiling with -CRriot and -