tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GNU inline functions



On Sun, 28 Mar 2010, David Holland wrote:

> On Sat, Mar 27, 2010 at 04:03:07PM +0000, Iain Hibbert wrote:
>  > [gcc inline lossage]
>
> Look at games/sail/inlinedefs.h, and how it's used in
> games/sail/array.h.

Yes, this is the same setup as signal.h & libc/gen/sigsetops.c

(btw all of games/ builds fine with HAVE_PCC=yes except dab(6) which is
C++ -- time for a rewrite, Christos? :)

> Something like what's in inlinedefs.h should go into cdefs.h, but I
> haven't gotten around to working out exactly what the symbol should be
> called...

Hm, perhaps useful - though I wonder how necessary such a construct is in
the global namespace? There don't appear to be many such instances in the
tree at least (I found sail, signal.h, gdb6 and binutils), most inlining
seems to be static (as Joerg suggests) but I'm not so keen to modify libc
semantics in that way..

If you do that though, the symbol should likely be __stdc_inline (or
uppercase), as GNU "extern inline" is C99 "inline" ?  (Google finds
nothing with that symbol, so it should be fairly safe..)

iain




Home | Main Index | Thread Index | Old Index