"possibly the nastiest piece of abuse of the C switch statement rules I know of"
pavel_lishin
39 points
11 comments
November 23, 2026
Related Discussions
Found 5 related stories in 39.1ms across 3,966 title embeddings via pgvector HNSW
- Code Smells of Desperation (2023) sammatilda · 15 pts · November 12, 2026 · 52% similar
- A great old-timey game-programming hack (2013) palsecam · 86 pts · November 11, 2026 · 44% similar
- *sshole, or when are we going to get rid of C? hasheddan · 35 pts · November 06, 2026 · 44% similar
- Spooky C++ nablags · 15 pts · October 31, 2026 · 44% similar
- Switch Lowering in GCC signa11 · 203 pts · October 31, 2026 · 43% similar
Discussion Highlights (4 comments)
TZubiri
> exposed a compiler bug i’m 99% sure this was unnecessary and hubrish whats that phrase about if you write the most clever code you can within the writing context, future you without that context won’t be able to understand it. well you were so clever that the compiler didnt understand it
janderland
Haha, love this. It’s funny they’re saying “don’t use GOTO” because this approach makes it obvious that switch cases are equivalent to GOTO which can transport you into one of the impossible of statements.
pavel_lishin
I did a double-take when I saw the name of the author, as I've been playing his puzzle packs for years. (Not to mention Putty - which I haven't used in probably a decade, but was my go-to in Windows.)
svilen_dobrev
also check: How to Get Fired Using Switch Statements & Statement Expressions\ https://blog.robertelder.org/switch-statements-statement-exp...