Reminded of this in conversation recently: possibly the nastiest piece of abuse of the C switch statement rules I know of that _wasn't_ done by either me or Tom Duff. This was contributed to #PuTTY's terminal code in 2000 as part of a much larger patch (and removed again in a 2001 rewrite).
The switch is processing the final character of one of the terminal escape sequences ESC#3, ESC#4, ESC#5, ESC#6 and ESC#8. Four of them do something very similar: they set an attribute on the current terminal line (indicating whether the text is double-width or double-height). The fifth is the odd one out. So you want a switch statement in which four of the five cases share _most_ of their code: each sets the line attribute to a different value, but the code for actually writing it into the terminal is the same.
You could write four case statements sharing a handler, and have a secondary switch inside the handler to choose the attribute. Or you could have four separate handlers that choose an attribute value, then hold your nose and write a 'goto' from each one to the shared code that writes it into the terminal data. Or you could put the shared code in a subroutine a long way away from here, and have four independent case handlers all call it with a different parameter.
Or you could do this, which complies with the letter of 'don't use goto', but makes you wish it hadn't! Control enters at one of the four case statements, and after setting the attribute variable, it then skips over each of the following case labels because of the if (0) { ... }. Then all of them fall through to the shared handler.
This code was in PuTTY for less than a year. But in that time it managed to expose a bug in a C compiler.
It was a small, independently written compiler (none of the huge code bases everyone's heard of now). We had an email from its maintainer to let us know – and to ask us what the code was _meant_ to do, because fair enough, it isn't obvious to everybody at first glance!
The bug was that the compiler optimised away if (0) { ... } statements, on the theory that they were unreachable. But the code in these if (0) statements _is_ reachable, via the case labels related to the containing switch. So the compiler had thrown away code that was actually needed, and then got confused when it couldn't generate the jump for those switch cases.
(The more usual strategy is to start by turning the whole function into a control-flow graph, i.e. blocks of straight-line code in a directed graph connected by edges that are effectively gotos. Then you can optimise conditional branches based on a constant into unconditional branches, deleting the never-traversed graph edge out of their block. Then you detect unreachable code by a search through the graph from the function entry point. That strategy avoids this problem.)