I\'m currently trying to figure out a way to break out of a for loop from within a function called in that loop. I\'m aware of the possibility to just have the
I believe it's related to how a break statement is translated into machine code. The break statement will be translated as a unconditional branch to the label immediately following the loop or switch.
mov ECX,5
label1:
jmp ;break
loop label1
While the call to foo() from inside the loop will result in something like
mov ECX,5
label1:
call
loop label1
and at foo address
call
jmp ;break cannot translate to any address.