[fpc-devel] Improper OUT usage.
Flávio Etrusco
flavio.etrusco at gmail.com
Tue Mar 12 08:57:55 CET 2013
On Mon, Mar 11, 2013 at 3:44 AM, Jonas Maebe <jonas.maebe at elis.ugent.be> 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 this in FPC?
>>
>> Have fun fixing the errors then:
>
> I thought he meant inside the routine with the out-parameter, i.e. add a similar check for out-parameters as for function results. On the caller side it doesn't matter whether or not the out-parameter is already initialized.
>
> Jonas
Yes, I meant this. And for a second I too thought "where is the out
param here?", but he's talking about the (local) variable case, which
I also mentioned. Because 'FillChar' (and quite some other frequently
used functions I AFAIR) receives a 'var' instead of 'out' I can't use
it.
I will only dare asking one more thing for now: FPC's employment of
SSA means having a similar level of checking as in Java (check
branches, for scalar values) is "doable", right?
Best regards,
Flávio
More information about the fpc-devel
mailing list