From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gcc-3.0.1 and 2.4.7-ac1
Date: Thu, 26 Jul 2001 20:12:17 +0000 (UTC) [thread overview]
Message-ID: <9jptj1$155$1@penguin.transmeta.com> (raw)
In-Reply-To: <20010726194800.A32053@vana.vc.cvut.cz> <E15PpJg-0004D5-00@the-village.bc.nu>
In article <E15PpJg-0004D5-00@the-village.bc.nu>,
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> following is patch which was needed for compiling 2.4.7-ac1
>> on box equipped with 'gcc version 3.0.1 20010721 (Debian prerelease)'.
>> As I did not see such complaint yet - here it is.
>> If you think that gcc is too lazy on inlining (I think so...),
>> tell me and I'll complain to gcc team instead of here.
>
>Fix gcc. We use extern inline to say 'must be inlined' and that was the
>semantic it used to have. Some of our inlines will not work if the compiler
>uninlines them.
No, we had this fight with the gcc people a few years back, and they
have a very valid argument for the current semantics
- "static inline" means "we have to have this function, if you use it
but don't inline it, then make a static version of it in this
compilation unit"
- "extern inline" means "I actually _have_ an extern for this function,
but if you want to inline it, here's the inline-version"
The only problem with "static inline" was some _really_ old gcc versions
that did the wrong thing and made a static version of the function in
_every_ compilation unit, whether it was needed or not. Those versions of
gcc do not work on the kernel anyway these days, so..
I think the current gcc semantics are (a) more powerful than the old one
and (b) have been in effect long enough that it's not painful for Linux
to just switch over to them. In short, we might actually want to start
taking advantage of them, and even if we don't we should just convert
all current users of "extern inline" to "static inline".
Linus
next prev parent reply other threads:[~2001-07-26 20:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-26 17:48 [PATCH] gcc-3.0.1 and 2.4.7-ac1 Petr Vandrovec
2001-07-26 17:52 ` Alan Cox
2001-07-26 20:12 ` Linus Torvalds [this message]
2001-07-27 6:55 ` Niels Kristian Bech Jensen
2001-07-27 8:34 ` Robert Schiele
2001-07-26 17:55 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2001-07-26 20:28 Petr Vandrovec
2001-07-27 0:57 ` Richard Henderson
2001-07-27 3:12 ` Linus Torvalds
2001-07-27 6:44 ` Wayne Whitney
2001-07-27 16:03 ` Florian Weimer
2001-07-27 18:14 Petr Vandrovec
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='9jptj1$155$1@penguin.transmeta.com' \
--to=torvalds@transmeta.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