Library standardization
Janice Caron
caron800 at googlemail.com
Sat Apr 19 06:59:05 PDT 2008
On 19/04/2008, e-t172 <e-t172 at akegroup.org> wrote:
> This function is now simple, it is likely it will be inlined by the
> compiler. Therefore, it will not be included in the shared library.
That assumption is false. Just because a function is small enough to
be inlined, doesn't mean its object code won't be in the library. In
fact, if I understand this correctly, the object code will always be
in the library.
The decision as to whether or not to inline cannot be made at the
library level. To make that decision most optimally, the compiler also
needs to know the calling code.
If all calls to a function are inlined, the linker should not link it
into the final executable, thereby avoiding code bloat.
More information about the Digitalmars-d
mailing list