This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/51930] [4.7 regression] Explicitly instantiated template gets hidden visibility


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51930

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-15 10:15:06 UTC ---
(In reply to comment #7)
> The test struct might come from an external library I have no control of, which
> will make it difficult to change its visibility.

You could declare the struct before including that library's headers and set
its visibility with a pragma:

#pragma GCC visibility push(default)
struct test;
#pragma GCC visibility pop


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