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

Re: Symbols and C++ inline constructor



Thomas Weber <tweber@debian.org> writes:
> On Fri, Jan 06, 2012 at 12:14:11AM +0000, Roger Leigh wrote:

>> IIRC inline is only a hint--it's not guaranteed to
>> be inlined if the compiler thinks it's more efficient not to.  

> That is exactly my problem. A newer compiler version might change the
> decision of the former version due to better optimization; but then I
> see no way to guarantee stable symbols in the library.

If it's a private symbol not intended to be used by clients and that
wouldn't naturally be used by clients, you can mark it optional in the
symbols file (symbol tag optional), and then the symbols generation won't
care if it appears and disappears.

You have to do that for some things with C++, since there are places where
C++ just doesn't give you control over what symbols are exported.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: