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

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.


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