This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Our docs about --enable/--disable-visibility
- From: Vincenzo Innocente <Vincenzo dot Innocente at cern dot ch>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 2 Nov 2011 15:50:38 +0100
- Subject: Re: Our docs about --enable/--disable-visibility
- Keywords: CERN SpamKiller Note: -50
- References: <4EABCA89.6040302@oracle.com> <CAH6eHdQF7ExPvX3ZMftdrVoJcj8ATZYov2uGU3jr35BK84m70A@mail.gmail.com> <18B77EE9-F9F1-4921-AFF3-DBFF17D40E60@cern.ch> <4EAE78ED.20400@oracle.com> <7BAAA9C0-CFAD-4AC5-9C90-6D6EBA1E0940@cern.ch> <4EB04405.9080007@redhat.com>
On 1 Nov, 2011, at 8:09 PM, Jason Merrill wrote:
> On 10/31/2011 06:41 AM, Vincenzo Innocente wrote:
>> The problem is that "default" means "force external visibility", not "use user visibility".
>
> The default for the standard library, yes. The standard library should have external visibility by default.
>
> Perhaps you want something like -fvisibility-inlines-hidden that also applies to .
>
In principle the fix for PR30066 should allow that when the function templates are explicitely inlined.
The point is that many std functions are NOT explicitely declared inline and therefore are not affected by -fvisibility-inlines-hidden.
I want to stress that my concern in not about the public standard interfaces, more about implementation details
such as :__introsort_loop, _move_median_first, the back-tree implementation behind std:map etc.
At the moment they can even be specialized and "pre-empted" by the user in a different shared library
(see discussion in http://sourceware.org/bugzilla/show_bug.cgi?id=12919) and I'm not really sure that this was the intention.
Declaring all those implementation functions inline and eventually moving them in a separate (not default visible) namespace other than "std" may be a suitable long term solution.
vincenzo
> Jason