Blocks of code into a C switch{}
A while ago I was digging deep into a C++ project, chasing an obscure bug. Neither the project in question nor the bug are important here. What’s important is that I’ve stumbled upon a weird syntax, that seemed wrong. What’s weird is that this block of code worked flawlessly, unlike some other parts of the project. Turns out you can have blocks of code inside a switch statement spilling between cases. Let me show you a simplified example: ...