[fpc-devel] Debugging Loop Unroll Optimization

Mattias Gaertner nc-gaertnma at netcologne.de
Fri May 18 18:00:02 CEST 2018


On Sat, 19 May 2018 01:16:00 +1000
"Thorsten Engler" <thorsten.engler at gmx.net> wrote:

>[...]
> The for-loop variable is undefined after the loop if the loop ran to completion. It retains its last value if the loop exited in a controlled way (goto, break, exit, ?) before running to completion.

You forgot the case where the loop was not entered:

for i:=2 to 1 do ;

i is now undefined.

Same for 

for i in emptyset do ;


Mattias



More information about the fpc-devel mailing list