guile-devel
[Top][All Lists]
Advanced

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

Re: Inline machinery


From: Ken Raeburn
Subject: Re: Inline machinery
Date: Sun, 24 Feb 2008 14:27:50 -0500

On Feb 22, 2008, at 13:11, Greg Troxel wrote:
address@hidden (Ludovic Courtès) writes:
Currently, we assume that only GCC knows how to handle "extern inline".
I'm not sure this assumption is true in practice (doesn't C99 specify
it?), but it's probably "good enough".

That seems ok - I'm not 100% clear on what's in the standards here,
particularly about declarations and inline definitions.

Unfortunately, when C99 specified it, about 10 years after GCC implemented it, the specification was different from GCC's implementation -- pretty close to reversing "inline" and "extern inline". And I think GCC's implementation is being updated to conform to the standard, but there's still the older versions and the transition period to deal with. Inline specifiers aside, you can't follow up a declaration with external linkage with another declaration with internal linkage, and I don't think the specs on "inline" change that.

What's the desired effect? Expand inline if possible, and provide an external definition for non-inline-expanded calls to reference? I think under C99 you want just plain "inline" for the inline definition, and then in one of the source files, add an "extern" declaration; that pretty much matches the example in the C99 spec.

Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]