I think you'd make a much more compelling case if this were a real scenario, rather than merely a pseudo-random integer loop with names like "x", "y", "z", "label1" and "label2". As it stands, the labels don't provide any added value to this code.
With current C++, I'd have to write it this way:
int main() {
for (int x = 0; x < 5; x++) {
for (int y = 0; y < 5; y++) {
for (int z = 0; z < 5; z++) {
std::cout << x << ',' << y << ',' << z << std::endl;
if (z + y == 8) goto continue_y_loop;
if (z + x == 3) goto break_y_loop;
if (x + y + z == 13) goto break_x_loop;
}
continue_y_loop:;
}
break_y_loop:;
}
break_x_loop:;
}
To be honest, that doesn't seem so bad.
= - = - = - =
May I ask: what scenario made you want to ask for this feature? Perhaps if you show what you were really trying to do, it could be more compelling?
-- Jorg