This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51930] [4.7 regression] Explicitly instantiated template gets hidden visibility
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Feb 2012 10:15:06 +0000
- Subject: [Bug c++/51930] [4.7 regression] Explicitly instantiated template gets hidden visibility
- Auto-submitted: auto-generated
- References: <bug-51930-4@http.gcc.gnu.org/bugzilla/>
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