home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:16765 comp.std.c++:1609
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!usc!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!plg.uwaterloo.ca!gjditchf
- From: gjditchf@plg.uwaterloo.ca (Glen Ditchfield)
- Subject: Re: Proposal - enhancement for switch statement.
- Message-ID: <By6BF7.5K5@math.uwaterloo.ca>
- Sender: news@math.uwaterloo.ca (News Owner)
- Organization: University of Waterloo
- References: <1992Nov19.163944.19935@ucc.su.OZ.AU> <1992Nov20.195059.1@vax1.bham.ac.uk> <9232811.8739@mulga.cs.mu.OZ.AU>
- Date: Mon, 23 Nov 1992 14:40:18 GMT
- Lines: 15
-
- In article <9232811.8739@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
- >Perhaps a good way to indicate that the fallthrough is deliberate would be to
- >use an explicit goto.
- > switch(x) { ...
- > case 2: ...
- > goto case_3: /* fall through */
- > case_3: /* [Note the "_"!] */
- > case 3: ...
- > }
- >
- >Any half-decent compiler will of course be able to optimize out the goto.
- >It is still irritating that you are not allowed to jump to case labels,
-
- If I remember correctly, the Plan 9 C compiler does allow "goto case 3"
- (that is, with no underscore).
-