[Bug c++/47877] New: -fvisibility-inlines-hidden does not hide member template functions
ogoffart at kde dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 24 09:53:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47877
Summary: -fvisibility-inlines-hidden does not hide member
template functions
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ogoffart@kde.org
Created attachment 23450
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23450
testcase
struct __attribute__((visibility("default"))) Foo {
inline void foo() {};
template <class C> inline void bar() {};
};
int main()
{
Foo().foo();
Foo().bar<Foo>();
}
/*
$ g++ main.cpp -fvisibility=hidden -fvisibility-inlines-hidden
$ objdump -t a.out | grep Foo
00000000004004fc w F .text 000000000000000a .hidden
_ZN3Foo3fooEv
0000000000400506 w F .text 000000000000000a
_ZN3Foo3barIS_EEvv
Why is Foo::bar not .hidden?
Note: removing the __attribute__((visibility("default"))) (and
-fvisibility=hidden) solve the problem.
*/
More information about the Gcc-bugs
mailing list