Re: [fpc-devel] Compiler hint for uninitialized local variable minor mistake

2009-05-29 Thread Jonas Maebe
On 29 May 2009, at 09:04, Micha Nelissen wrote: Jonas Maebe wrote: It is not possible to change this in the compiler. The reason is that if we change the first parameter of fillchar from a "var" parameter (as it is now) into an "out" parameter (so the hint would not be shown), then the be

Re: [fpc-devel] Compiler hint for uninitialized local variable minor mistake

2009-05-29 Thread Jonas Maebe
On 29 May 2009, at 09:44, Flávio Etrusco wrote: (...) This is due to the fact that if you pass a variable to an out parameter and this variable is reference counted or contains reference counted elements (in case of an array/record/object), then the compiler has to insert finalization cod

Re: [fpc-devel] Compiler hint for uninitialized local variable minor mistake

2009-05-29 Thread Flávio Etrusco
> (...) > > This is due to the fact that if you pass a variable to an out parameter and > this variable is reference counted or contains reference counted elements > (in case of an array/record/object), then the compiler has to insert > finalization code at the caller side for this variable before

Re: [fpc-devel] Compiler hint for uninitialized local variable minor mistake

2009-05-29 Thread Micha Nelissen
Jonas Maebe wrote: It is not possible to change this in the compiler. The reason is that if we change the first parameter of fillchar from a "var" parameter (as it is now) into an "out" parameter (so the hint would not be shown), then the behaviour of the code changes. Wasn't "outvar" a long

Re: [fpc-devel] Compiler hint for uninitialized local variable minor mistake

2009-05-29 Thread Jonas Maebe
On 29 May 2009, at 01:44, ABorka wrote: fillchar(tmp, sizeof(tmp), #0); gives the Hint: Local variable "tmp" does not seem to be initialized message upon compilation, which should not happen because it is actually the initialization. It is not possible to change this in the compiler. The r

[fpc-devel] Compiler hint for uninitialized local variable minor mistake

2009-05-28 Thread ABorka
fillchar(tmp, sizeof(tmp), #0); gives the Hint: Local variable "tmp" does not seem to be initialized message upon compilation, which should not happen because it is actually the initialization. ___ fpc-devel maillist - fpc-devel@lists.freepascal.o