Re: [AD] namespace collision

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, Aug 10, 2001 at 03:52:27PM +1000, Peter Wang wrote:
> Presumably, what we'd do is this: old-name compatibility functions
> would be defined in `allegro.h', and marked with "extern inline" (a
> gcc-ism, AFAIK).  The compiler can use those definitions to produce
> inlined code, but it won't actually produce the function.  Since the
> function won't exist, your code won't link.

That's what I had in mind, but I don't much like the way people
would be seeing "unresolved reference to ..." for Allegro
functions.

> I think "static inline" was used in older versions of gcc.  The
> difference between "static inline" and "extern inline" in (newer)
> gcc is that "static inline" *will* produce a function, at least
> sometimes (e.g. when you take the address of that function).  It's
> probably best not to use "static inline", though, in case it makes
> our code size blow up.

Not *our* code size, the user's. :)  Provided gcc and MSVC both
only generate the functions when they're actually needed, I
think this would be ideal.  But I agree that we can't have these stubs
linked into every single file; we'd have to extern inline then.

George



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/