This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]