mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Cherry <cherry@osdl.org>
To: "J.A. Magallon" <jamagallon@able.es>
Cc: Lista Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: gcc-3.4.1 and -Winline
Date: Fri, 25 Jun 2004 07:54:09 -0700	[thread overview]
Message-ID: <1088175248.4344.6.camel@cherrybomb.pdx.osdl.net> (raw)
In-Reply-To: <20040624234455.GA4058@werewolf.able.es>

"J.A. Magallon" wrote:
> 
> This are the warnings I get with gcc-3.4.1 CVS, when building
2.6.7-mm2.
> Just for if some is really serious, ie, something that does not work
if
> compiled out-of-line (but I suppose I had noticed ;) ).
> Or if it origins a huge performace penalty.
[...]
> 
>   CC      arch/i386/kernel/timers/timer_tsc.o
> arch/i386/kernel/timers/timer_tsc.c: In function `mark_offset_tsc':
> arch/i386/kernel/timers/timer_tsc.c:30: warning: inlining failed in
call to \
> 'cpufreq_delayed_get': function body not available \
> arch/i386/kernel/timers/timer_tsc.c:248: warning: called from here
[... more warnings deleted for brevity ...]

Well, gcc 3.2.2 with -Winline does not complain, but interestingly 
enough sparse does (at least in the above case and some others):

  CHECK   arch/i386/kernel/timers/timer_tsc.c
arch/i386/kernel/timers/timer_tsc.c:30:39: warning: marked inline, but without a definition

Basically this is a case of having:
        #1:     static inline void foo(void); /* forward decl without body */
        ...
        #2:     void bar(void) { foo(); } /* function using the inline */
        ...
        #3:     static inline void foo(void) { return; } /* actual inline def. */
in the above order.

I have not looked at resulting .o file with gcc 3.2.2, but would not be too
surprised if it also silently just ignores the "inline" in lines #1 and #3 above.

There are obviously two trivial fixes above, either just remove the inline (making
foo a normal static function) or reorder #2 and #3.

John



  reply	other threads:[~2004-06-25 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 23:44 J.A. Magallon
2004-06-25 14:54 ` John Cherry [this message]
2004-06-25 23:05   ` Jesper Juhl

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=1088175248.4344.6.camel@cherrybomb.pdx.osdl.net \
    --to=cherry@osdl.org \
    --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

all inboxes | Powered by JetHome®