public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: hpa@zytor.com (H. Peter Anvin)
To: linux-kernel@vger.kernel.org
Subject: Re: Don't return void types from void functions.
Date: Fri, 28 May 2004 22:20:11 +0000 (UTC)	[thread overview]
Message-ID: <c98dur$pd5$1@terminus.zytor.com> (raw)
In-Reply-To: 40B43913.7010207@pobox.com

Followup to:  <40B43913.7010207@pobox.com>
By author:    Jeff Garzik <jgarzik@pobox.com>
In newsgroup: linux.dev.kernel
>
> Linux Kernel Mailing List wrote:
> > diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
> > --- a/drivers/net/tokenring/olympic.c	2004-05-25 23:06:49 -07:00
> > +++ b/drivers/net/tokenring/olympic.c	2004-05-25 23:06:49 -07:00
> > @@ -1806,7 +1806,7 @@
> >  
> >  static void __exit olympic_pci_cleanup(void)
> >  {
> > -	return pci_unregister_driver(&olympic_driver) ; 
> > +	pci_unregister_driver(&olympic_driver) ; 
> >  }	
> 
> 
> Can we make gcc error out when it finds this?
> 

What's wrong with it?  Seriously... "return foo();" is the closest
thing to a tailcall syntax as C/C++ has, and I've always considered it
a Total Fscking Pain in The Ass[TM] that it somehow thinks functions
returning void should have a different syntax than all other functions.

	-hpa

      parent reply	other threads:[~2004-05-28 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200405260606.i4Q66dXB023475@hera.kernel.org>
2004-05-26  6:28 ` Don't return void types from void functions Jeff Garzik
2004-05-26  8:38   ` Denis Vlasenko
2004-05-26  8:59     ` Paweł Sikora
2004-05-28 22:20   ` H. Peter Anvin [this message]

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='c98dur$pd5$1@terminus.zytor.com' \
    --to=hpa@zytor.com \
    --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