[PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]
Jakub Jelinek
jakub@redhat.com
Wed Sep 25 11:30:55 GMT 2024
On Wed, Sep 25, 2024 at 12:18:07PM +0100, Jonathan Wakely wrote:
> > > And whether similarly we couldn't use
> > > __attribute__((__visibility__ ("hidden"))) on the static block scope
> > > vars for C++ (again, if compiler supports that), so that the changes
> > > don't affect ABI of C++ libraries.
> >
> > That sounds good too.
>
> Can you use visibility attributes on a local static? I get a warning
> that it's ignored.
Indeed :(
And #pragma GCC visibility push(hidden)/#pragma GCC visibility pop around
just the static block scope var definition does nothing.
If it is around the whole inline function though, then it seems to work.
Though, unsure if we want that around the whole header; wonder what it would
do with the weakrefs.
Jakub
More information about the Libstdc++
mailing list