All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J . A . Magallon" <jamagallon@able.es>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Bill Wendling <wendling@ganymede.isdn.uiuc.edu>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"J . A . Magallon" <jamagallon@able.es>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gcc-3.0 warnings
Date: Fri, 23 Mar 2001 23:59:09 +0100	[thread overview]
Message-ID: <20010323235909.C3098@werewolf.able.es> (raw)
In-Reply-To: <20010323162956.A27066@ganymede.isdn.uiuc.edu> <Pine.LNX.4.31.0103231433380.766-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.31.0103231433380.766-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Fri, Mar 23, 2001 at 23:34:15 +0100


On 03.23 Linus Torvalds wrote:
> 
> I agree. I'd much prefer that syntax also.
> 
> Or just remove the "default:" altogether, when it doesn't make any
> difference.
> 

Well, at last some sense. The same is with that ugly out: at the end
of the function. Just change all that 'goto out' for a return.
It does not matter, -O2 is going to do what it wants.

And the missing return 0 at the end of functions that call a 'noreturn'
function. gcc 2.96 still wants them. But it looks like a religious matter
to put ot not to put that stupid return just to shut up the compiler.
As I understand, the noreturn says that the function that is marked as
noreturn is allowed to have missing correct return paths, and the compiler
can build, for example <panic>, without worring about the global state
once it has entered <panic>. But <info gcc> says nothing about functions
that call a 'noreturn' function. So I see as INCORRECT to omit a return path
in a function that calls <panic>.

And if people is so worried about fast paths, begin to use 'const' or
'pure' functions. I think that can help the compiler to generate fast code
more than trying to do hancrafted fast paths that the compiler will reorganize.

-- 
J.A. Magallon                                          #  Let the source
mailto:jamagallon@able.es                              #  be with you, Luke... 

Linux werewolf 2.4.2-ac22 #3 SMP Fri Mar 23 02:06:00 CET 2001 i686


  reply	other threads:[~2001-03-23 23:00 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 [this message]
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
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=20010323235909.C3098@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=wendling@ganymede.isdn.uiuc.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.