From: Matthew Wilcox <willy@debian.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH][2.6.8-rc1-mm1] drivers/scsi/sg.c gcc341 inlining fix
Date: Thu, 15 Jul 2004 01:19:35 +0100 [thread overview]
Message-ID: <20040715001935.GB32326@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <40F5C42E.1060708@pobox.com>
On Wed, Jul 14, 2004 at 07:39:26PM -0400, Jeff Garzik wrote:
> ??? C does not require ordering of function _implementations_, except
> for this gcc brokenness.
Actually, GCC has always required that inlines be specified first
for them to be inlined, even in earlier versions. For example, from the
gcc 3.3 manual:
Some calls cannot be integrated for various reasons (in particular,
calls that precede the function's definition cannot be integrated, and
neither can recursive calls within the definition). If there is a
nonintegrated call, then the function is compiled to assembler code as
usual.
> The above example allows one to do what one normally does with
> non-inlines: order code to enhance readability, and the compiler will
> Do The Right Thing and utilize it in the best way the CPU will function.
I find it enhances readability to place functions in reverse order.
That way I know I can just go to the top of a file, and the first match
on the function's name is its definition.
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next prev parent reply other threads:[~2004-07-15 0:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-14 17:51 Mikael Pettersson
2004-07-14 18:36 ` Jeff Garzik
2004-07-14 19:05 ` Adrian Bunk
2004-07-14 21:35 ` Andrew Morton
2004-07-14 23:39 ` Jeff Garzik
2004-07-14 22:39 ` Andrew Morton
2004-07-15 0:19 ` Matthew Wilcox [this message]
2004-07-15 5:56 ` Jens Axboe
2004-07-15 6:12 ` William Lee Irwin III
2004-07-15 15:42 ` Douglas Gilbert
-- strict thread matches above, loose matches on Subject: below --
2004-07-15 9:46 Mikael Pettersson
2004-07-15 13:09 ` Jeff Garzik
2004-07-15 15:58 ` Matthew Wilcox
2004-07-15 14:36 ` William Lee Irwin III
2004-07-14 12:16 Mikael Pettersson
2004-07-14 15:52 ` Jeff Garzik
2004-07-14 16:42 ` Adrian Bunk
2004-07-14 16:44 ` Jeff Garzik
2004-07-14 16:54 ` Adrian Bunk
2004-07-14 17:31 ` Bartlomiej Zolnierkiewicz
2004-07-14 18:33 ` Adrian Bunk
2004-07-14 18:44 ` Jeff Garzik
2004-07-14 19:06 ` Douglas Gilbert
2004-07-26 22:09 ` Andrew Morton
2004-07-14 18:34 ` Jeff Garzik
2004-07-14 18:31 ` Jeff Garzik
2004-07-14 15:57 ` Bartlomiej Zolnierkiewicz
2004-07-14 15:59 ` Jeff Garzik
2004-07-26 21:53 ` Andrew Morton
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=20040715001935.GB32326@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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
all inboxes | Powered by JetHome®