This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: switch question in recog.c
- From: Chris Lattner <sabre at nondot dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 7 Oct 2003 14:47:02 -0500 (CDT)
- Subject: Re: switch question in recog.c
> Huh. I would have failed that question miserably after using the
> language for 20 years. It would never occur to me to put a case after
> the default label, let alone inside a control structure of some sort.
> How miserable :-) But you are right, the standard doesnt appear to
> disallow it that I can see.
If you like this, you might like "Duff's Device", which abuses switch
statements even worse:
http://www.lysator.liu.se/c/duffs-device.html
I'm happy LLVM doesn't have to worry about this stuff. :)
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/