[fpc-devel] Improper OUT usage.

Flávio Etrusco flavio.etrusco at gmail.com
Sun Mar 10 20:39:27 CET 2013


On Sun, Mar 10, 2013 at 11:56 AM, Marco van de Voort <marcov at stack.nl> 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-passrc, because if you have an out parameter,
>> then the callee has to output a valid variable. If it asumes that is
>> initialized when called, then it must use var instead.
>
> I already had changed it to var in r23760. I did want to warn for the
> bug's pattern, so I wrote this to the ml.
>

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?

-Flávio



More information about the fpc-devel mailing list