Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: linux-mips@oss.sgi.com
Subject: gcc 3.x, -ansi and "static inline"
Date: Fri, 1 Feb 2002 11:52:06 -0800	[thread overview]
Message-ID: <20020201115206.A18085@mvista.com> (raw)


We are trying to build userland apps with the newer kernel headers.
Unexpected problems occur with the "static inline" declaration
when "-ansi" option is used.

Anybody else is having the problem?

Also, what are the reasons for us to switch to "static inline" in the
kernel header?

Here is an example I am talking about:

In 2.4.2, we have in bitops.h:

extern __inline__ unsigned long ffz(unsigned long word)

In 2.4.17, we have instead:

static inline unsigned long ffz(unsigned long word)

This problem seems only happening with gcc 3.x.  I start to wonder
whether we should fix kernel header.  In some case, the fix seems
to be not exposing to userland (by #ifdef __KERNEL__).  In others,
the fix might be using __inline__.  

However, I really like to know what was the original motivation
to do such a change.

BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary
and caused a bunch of similar errors.

Jun

             reply	other threads:[~2002-02-01 20:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 19:52 Jun Sun [this message]
2002-02-02  9:17 ` gcc 3.x, -ansi and "static inline" Geert Uytterhoeven
2002-02-03 17:01 ` Ralf Baechle
2002-02-04 19:28   ` Jun Sun
2002-02-04 22:21     ` Ralf Baechle
2002-02-04 22:56       ` Jun Sun
2002-02-04 23:01         ` Ralf Baechle

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=20020201115206.A18085@mvista.com \
    --to=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    /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