This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fvisibility=hidden vs. extern "C"


Jason Merrill wrote:
Jakub Jelinek wrote:
In the eh_personality.ii you posted with -fvisibility the prototype
of __gxx_personality_v0 is marked with default visibility (as it is
surrounded by #pragma GCC visibility {push(default), pop} pair),
but the actual definition is not marked in any way. As it is a definition,
-fvisibility=hidden causes its visibility to be specified to hidden,
and as hidden is stronger visibility than default, hidden wins.

Hmm, this shouldn't happen; if the prototype has explicit visibility it should override -fvisibility.

Ah, I see what the problem is. The prototype is in __cxxabiv1 and the definition is in the global namespace, so they don't get combined. One or the other should move; I'd probably move the definition into the namespace.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]