public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47877] New: -fvisibility-inlines-hidden does not hide member template functions
@ 2011-02-24  9:53 ogoffart at kde dot org
  0 siblings, 0 replies; only message in thread
From: ogoffart at kde dot org @ 2011-02-24  9:53 UTC (permalink / raw)
  To: gcc-bugs

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.
*/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-24  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24  9:53 [Bug c++/47877] New: -fvisibility-inlines-hidden does not hide member template functions ogoffart at kde dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).