Yes, at least in C and I think also C++. The same applies to goto as well. I would be surprised if you ever see a jump into a loop body in modern code because it's almost always a bad idea: it's easily a potential source of bugs.
It could be to hint to the compiler to generate a jump table for the function. A jump table is a list of addresses to jump to with numbers. It compresses a large number of if(){goto}s into a goto table[case].
View all comments
Show parent comment
8
u/nwL_ Feb 20 '20
I’ve been programming C++ for 7 years now, and I have never encountered a syntax such as
I wouldn’t even know how to read it. Can you just jump into the middle of a loop? This is confusing.