It's fun watching people rediscover this every so often. If you like this sort of thing, go check out creating generator functions using a switch embedded throughout your function. You can wrap it in macros to end up with a nice yield keyword emulation.
Is this essentially the mechanism behind Duff's Device (switch cases being better thought of as line-oriented jumps instead of structured blocks) but generalised?