The code I have looks like this (all uses of done shown):
bool done = false;
for(int i = 0; i < big; i++)
{
...
for(int j = 0; j < wow; j++)
{
...
if(foo(i,j))
{
done = true;
break;
}
...
}
if(done) break;
...
}
will any compilers convert it to this:
for(int i = 0; i < big; i++)
{
...
for(int j = 0; j < wow; j++)
{
...
if(foo(i,j))
goto __done; // same as a labeled break if we had it
...
}
...
}
__done:;
Note: While I'm mostly interested in if the if(done)break;
gets bypassed, I'm also interested in if it and done
gets removed altogether.