linux-mips
[Top] [All Lists]

Re: gcc 3.x, -ansi and "static inline"

To: Ralf Baechle <ralf@oss.sgi.com>
Subject: Re: gcc 3.x, -ansi and "static inline"
From: Jun Sun <jsun@mvista.com>
Date: Mon, 04 Feb 2002 14:56:43 -0800
Cc: linux-mips@oss.sgi.com
References: <20020201115206.A18085@mvista.com> <20020203180151.A5371@dea.linux-mips.net> <3C5EE0D0.F2CC94CE@mvista.com> <20020204232108.A7266@dea.linux-mips.net>
Sender: owner-linux-mips@oss.sgi.com
Ralf Baechle wrote:
> 
> On Mon, Feb 04, 2002 at 11:28:16AM -0800, Jun Sun wrote:
> 
> > > On Fri, Feb 01, 2002 at 11:52:06AM -0800, Jun Sun wrote:
> > >
> > > > BTW, the inclusion of "mipsregs.h" file in bitops.h seems unnecessary
> > > > and caused a bunch of similar errors.
> > >
> > > Indeed, it was pointless and I therefore removed it.
> >
> > What about ffz()?  We can do:
> 
> Including kernel header files into user code is the actual bug

In theory, yes.  In practice, kernel head is all a big mesh where we don't
have a clear division as which part can go to userland and which part can't.

The inline function makes mesh even meshier.

> but if
> you think fixing that isn't an option I can certainly so a
> s/inline/__inline__/
> 

I think this is the case.  See the inclusion chain below.  BTW, the app is
libcap.

In file included from
/opt/hardhat/devkit/mips/sb1_fp_be/target/usr/include/linux/fs.h:26,
                 from
/opt/hardhat/devkit/mips/sb1_fp_be/target/usr/include/linux/capability.h:17,
                 from
/var/tmp/BUILD/libcap-1.10.orig/libcap/include/sys/capability.h:24,
                 from libcap.h:19,
                 from cap_alloc.c:12:
/opt/hardhat/devkit/mips/sb1_fp_be/target/usr/include/asm/bitops.h:678: syntax
error before "unsigned"


Jun

<Prev in Thread] Current Thread [Next in Thread>