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: "sefi at s-e-f-i dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Jan 2012 12:19:48 +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
Philipp <sefi@s-e-f-i.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #5 from Philipp <sefi@s-e-f-i.de> 2012-01-29 12:19:48 UTC ---
Thanks, Jason, the above test case now works.
However, a similar problem with explicitly instantiated template classes still
exists.
Here is a test case.
struct test
{
};
template<
typename T
>
struct template_test
{
__attribute__((visibility("default")))
void function();
};
template<
typename T
>
void template_test<T>::function()
{
}
template
__attribute__((visibility("default")))
struct template_test<test>;
With gcc-4.7, template_test<test>::function gets hidden visibility, while with
gcc-4.6.2 it gets default visibility.