From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jeff Garzik <jeff@garzik.org>,
Randy Dunlap <rdunlap@xenotime.net>,
Al Viro <viro@ftp.linux.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org
Subject: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels
Date: Mon, 04 Jun 2007 12:00:52 -0700 [thread overview]
Message-ID: <46646164.3010406@goop.org> (raw)
In-Reply-To: <46644B99.1060304@zytor.com>
H. Peter Anvin wrote:
> goto labels are scoped in one sense: they are only reachable from inside
> the block they are defined in, so I would disagree with this statement.
>
Erm, no I think you're wrong there (or we're talking at cross
purposes). They're visible to the whole function they're defined in,
regardless of what block scope happens to be current at the time. You
need to use the gcc "__label__" extension to make a locally-scoped
label. Otherwise this wouldn't work:
if (a_failed)
goto cleanup;
[...]
if (b_failed) {
cleanup:
cleanup();
}
J
next prev parent reply other threads:[~2007-06-04 19:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-03 14:24 [RFC] Documentation/CodingStyle: Add rules for goto labels WANG Cong
2007-06-03 14:29 ` Al Viro
2007-06-03 14:45 ` Randy Dunlap
2007-06-03 15:35 ` Jeff Garzik
2007-06-04 4:58 ` WANG Cong
2007-06-04 6:59 ` Jeremy Fitzhardinge
2007-06-04 7:51 ` WANG Cong
2007-06-04 8:19 ` [RFC] Documentation/CodingStyle: Add rules for goto labels (-v2) WANG Cong
2007-06-04 18:30 ` Sam Ravnborg
2007-06-04 19:02 ` Jeremy Fitzhardinge
2007-06-05 1:37 ` WANG Cong
2007-06-10 2:31 ` Al Viro
2007-06-04 17:27 ` [RFC] Documentation/CodingStyle: Add rules for goto labels H. Peter Anvin
2007-06-04 19:00 ` Jeremy Fitzhardinge [this message]
2007-06-04 21:34 ` H. Peter Anvin
2007-06-04 17:27 ` H. Peter Anvin
2007-06-04 17:35 ` Jan Engelhardt
2007-06-04 17:43 ` H. Peter Anvin
2007-06-04 17:54 ` Valdis.Kletnieks
2007-06-04 18:01 ` H. Peter Anvin
2007-06-04 17:57 ` Jeff Garzik
2007-06-05 2:10 ` WANG Cong
2007-06-05 2:12 ` Jeff Garzik
2007-06-05 2:31 ` H. Peter Anvin
2007-06-05 7:44 ` WANG Cong
2007-06-05 9:16 ` Rene Herman
2007-06-06 4:53 ` WANG Cong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46646164.3010406@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox