public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tim Waugh <twaugh@redhat.com>
To: "J . A . Magallon" <jamagallon@able.es>
Cc: Andrew Morton <andrewm@uow.edu.au>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gcc-3.0 warnings
Date: Sat, 24 Mar 2001 21:51:02 +0000	[thread overview]
Message-ID: <20010324215102.R1469@redhat.com> (raw)
In-Reply-To: <20010323162956.A27066@ganymede.isdn.uiuc.edu> <Pine.LNX.4.31.0103231433380.766-100000@penguin.transmeta.com>, <Pine.LNX.4.31.0103231433380.766-100000@penguin.transmeta.com>; <20010323235909.C3098@werewolf.able.es> <3ABBED86.3B7ED60B@uow.edu.au> <20010324015515.C10781@werewolf.able.es>
In-Reply-To: <20010324015515.C10781@werewolf.able.es>; from jamagallon@able.es on Sat, Mar 24, 2001 at 01:55:15AM +0100

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

On Sat, Mar 24, 2001 at 01:55:15AM +0100, J . A . Magallon wrote:

> 
> On 03.24 Andrew Morton wrote:
> > "J . A . Magallon" wrote:
> > > 
> > >  The same is with that ugly out: at the end
> > > of the function. Just change all that 'goto out' for a return.
> > 
> > Oh no, no, no.  Please, no.
> > 
> > Multiple return statements are a maintenance nightmare.
> > 
> 
> Well, I do not want this to restart a religion war.
> 
> The real thing is: gcc 3.0 (ISO C 99) does not like that practice
> (let useless things there for someday using them ?).

The GCC warning has nothing to do with the (good) practice of having a
single exit point.  It is the difference between this:

...
out:
}

and this:

...
out:
	return;
}

I think that the latter looks better, and the C standard says that
it's also the only one that's correct.

You are the one arguing about coding religion, by saying that
_neither_ of them is any good.

Tim.
*/

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2001-03-24 21:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-23  0:11 [PATCH] gcc-3.0 warnings J . A . Magallon
2001-03-23  0:28 ` Alan Cox
2001-03-23  0:38   ` J . A . Magallon
2001-03-23  9:29     ` Tim Waugh
2001-03-23 23:56     ` Ingo Oeser
2001-03-23 22:29   ` Bill Wendling
2001-03-23 22:34     ` Linus Torvalds
2001-03-23 22:59       ` J . A . Magallon
2001-03-24  0:31         ` Tim Wright
2001-03-24  0:42         ` Andrew Morton
2001-03-24  0:55           ` J . A . Magallon
2001-03-24 21:51             ` Tim Waugh [this message]
2001-03-24  1:16         ` Stephen Satchell
2001-03-26 14:25           ` Tim Wright
2001-03-24  5:30         ` Ion Badulescu
2001-03-23 17:12 ` Horst von Brand

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=20010324215102.R1469@redhat.com \
    --to=twaugh@redhat.com \
    --cc=andrewm@uow.edu.au \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    /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