https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113958

Nikolas Klauser <nikolasklauser at berlin dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nikolasklauser at berlin dot de

--- Comment #4 from Nikolas Klauser <nikolasklauser at berlin dot de> ---
This would also be really useful for libc++ in a slightly different usage
pattern. Generally, we want everything to have hidden visibility to avoid
baking lots of functions into the ABI, but the typeinfo and friends have to
have default visibility to support `dynamic_cast`ing across shared libraries.
If we have the attribute available we can simply have `namespace
__attribute__((visibility("hidden"), type_visibility("default"))) std { ... }`
instead of having to annotate every single class. This would save us north of
800 annotations (plus ones we're missing) across the library, since we can roll
this into our `_LIBCPP_BEGIN_NAMESPACE_STD` macro.

Reply via email to