https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88893
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |rguenth at gcc dot gnu.org
Last reconfirmed|2019-01-17 00:00:00 |2024-8-21
Known to fail| |14.2.0
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-confirmed. Just got a question like this, in particular the question was
whether dropping the attribute is the correct thing to do. One observes
for:
enum class Enum {};
class Param {};
template<typename T>
class __attribute__((visibility("default"))) C {
public:
void f();
};
template<typename T>
void C<T>::f() {}
template class C<Enum>;
template class C<Param>;
compiling with -fvisibility=hidden:
4: 0000000000000000 11 FUNC WEAK DEFAULT 6 _ZN1CI4EnumE1fEv
5: 0000000000000000 11 FUNC WEAK HIDDEN 7 _ZN1CI5ParamE1fEv
so the behavior is different for class Enum vs. class template parameter
instances of C.