3 ms·
The source of confusion is my generic naming. Name it “files_loop: for …” and “break/continue files_loop” will be obvious to a reader. Also do not forget that a
by wruza 5y ago
The source of confusion is my generic naming. Name it “files_loop: for …” and “break/continue files_loop” will be obvious to a reader. Also do not forget that a label is not a distinct point in C, it is a part of a “labelled statement” [1], so you do not break to it, you break/continue/goto it.
I think it's one of the few perfectly valid uses goto.
I fully agree, but for 99% of our religious peers it is an NSFW taboo.
[1] https://www.lysator.liu.se/c/ANSI-C-grammar-y.html#labeled-statement https://www.lysator.liu.se/c/ANSI-C-grammar-y.html#labeled-s...