Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | James Kuyper <jameskuyper@verizon.net> |
| Newsgroups | comp.lang.c |
| Subject | Re: Can I jump to a case inside a switch using goto? |
| Date | Thu, 03 Apr 2014 12:44:11 -0400 |
| Organization | Self |
| Lines | 19 |
| Message-ID | <533D8FDB.30202@verizon.net> (permalink) |
| References | <1af492a6-6797-401a-af65-afe48c7d83fc@googlegroups.com> <lnmwg3dub4.fsf@nuthaus.mib.org> <lhivi2$gku$1@reader1.panix.com> <lhjhqm$jjv$1@dont-email.me> <lhjjof$rv9$1@reader1.panix.com> <lhjqfs$ikr$1@dont-email.me> <lna9c2e9b5.fsf@nuthaus.mib.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx05.eternal-september.org; posting-host="3543eedc8d2eea21288322f360238b6b"; logging-data="23419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KUT8iZjAUY7eJu5tF4vdW3te6gxsQ99Y=" |
| User-Agent | Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
| In-Reply-To | <lna9c2e9b5.fsf@nuthaus.mib.org> |
| Cancel-Lock | sha1:QfVr83lCqHUMABXzTNxAdijUk/s= |
| Xref | csiph.com comp.lang.c:42545 |
Show key headers only | View raw
On 04/03/2014 11:12 AM, Keith Thompson wrote: > James Kuyper <jameskuyper@verizon.net> writes: > [...] >> If you want i to have a well-defined value after the goto, move the >> label before the declaration of i, or make i static. > > Though C has permitted mixed declarations and statements since C99, it > still doesn't permit labels on declarations. This: > > label: int i = 0; > > is a syntax error. (I just ran into this the other day.) > > You can just add a null statement: > > label:; int i = 0; That's what I actually meant, though I didn't say it quite right.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can I jump to a case inside a switch using goto? rivkaumiller@gmail.com - 2014-04-02 18:48 -0700
Re: Can I jump to a case inside a switch using goto? Keith Thompson <kst-u@mib.org> - 2014-04-02 19:24 -0700
Re: Can I jump to a case inside a switch using goto? <william@wilbur.25thandClement.com> - 2014-04-02 20:02 -0700
Re: Can I jump to a case inside a switch using goto? rivkaumiller@gmail.com - 2014-04-02 23:04 -0700
Re: Can I jump to a case inside a switch using goto? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-04-03 07:51 +0000
Re: Can I jump to a case inside a switch using goto? "BartC" <bc@freeuk.com> - 2014-04-03 09:39 +0100
Re: Can I jump to a case inside a switch using goto? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-03 11:52 +0100
Re: Can I jump to a case inside a switch using goto? "BartC" <bc@freeuk.com> - 2014-04-03 12:42 +0100
Re: Can I jump to a case inside a switch using goto? Keith Thompson <kst-u@mib.org> - 2014-04-03 08:04 -0700
Re: Can I jump to a case inside a switch using goto? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-04-03 15:59 +0000
Re: Can I jump to a case inside a switch using goto? Lowell Gilbert <lgusenet@be-well.ilk.org> - 2014-04-03 14:24 -0400
Re: Can I jump to a case inside a switch using goto? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-04 23:06 +0100
Re: Can I jump to a case inside a switch using goto? Paul N <gw7rib@aol.com> - 2014-04-03 04:15 -0700
Computed GOTOs (Was: Can I jump to a case inside a switch using goto?) gazelle@shell.xmission.com (Kenny McCormack) - 2014-04-03 11:33 +0000
Re: Computed GOTOs Richard <rgrdev_@gmail.com> - 2014-04-03 12:38 +0100
Re: Can I jump to a case inside a switch using goto? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-04 23:22 +0100
Re: Can I jump to a case inside a switch using goto? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2014-04-03 01:20 -0700
Re: Can I jump to a case inside a switch using goto? rivkaumiller@gmail.com - 2014-04-03 14:51 -0700
Re: Can I jump to a case inside a switch using goto? rivkaumiller@gmail.com - 2014-04-03 14:56 -0700
Re: Can I jump to a case inside a switch using goto? rivkaumiller@gmail.com - 2014-04-02 23:08 -0700
Re: Can I jump to a case inside a switch using goto? Keith Thompson <kst-u@mib.org> - 2014-04-03 08:09 -0700
Re: Can I jump to a case inside a switch using goto? JohnF <john@please.see.sig.for.email.com> - 2014-04-03 06:36 +0000
Re: Can I jump to a case inside a switch using goto? James Kuyper <jameskuyper@verizon.net> - 2014-04-03 07:48 -0400
Re: Can I jump to a case inside a switch using goto? JohnF <john@please.see.sig.for.email.com> - 2014-04-03 12:21 +0000
Re: Can I jump to a case inside a switch using goto? James Kuyper <jameskuyper@verizon.net> - 2014-04-03 10:16 -0400
Re: Can I jump to a case inside a switch using goto? Keith Thompson <kst-u@mib.org> - 2014-04-03 08:12 -0700
Re: Can I jump to a case inside a switch using goto? James Kuyper <jameskuyper@verizon.net> - 2014-04-03 12:44 -0400
Re: Can I jump to a case inside a switch using goto? JohnF <john@please.see.sig.for.email.com> - 2014-04-04 07:06 +0000
Re: Can I jump to a case inside a switch using goto? Tim Rentsch <txr@alumni.caltech.edu> - 2014-04-14 16:38 -0700
Re: Can I jump to a case inside a switch using goto? rivkaumiller@gmail.com - 2014-04-03 00:18 -0700
Re: Can I jump to a case inside a switch using goto? "BartC" <bc@freeuk.com> - 2014-04-03 09:49 +0100
csiph-web