[Bug c++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Fri Jan 13 12:03:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-13
                 CC|                            |jason at gcc dot gnu.org
            Summary|-fvisibility=hidden causes  |[4.7 Regression]
                   |std::codecvt members to be  |-fvisibility=hidden causes
                   |undefined                   |std::codecvt members to be
                   |                            |undefined
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-13 11:53:58 UTC ---
Jason, this happens only in mainline and I'm trying to figure if it may have to
do with our recent changes in the visibility area (like PR35688).

We have a problem with, for example, the std::use_facet specializations which
we declare extern template (in bits/codecvt.h):

  extern template
    const codecvt<wchar_t, char, mbstate_t>&
    use_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);

note that the latter happens in the namespace std as decorated visibility
default.

The library normally exports the required use_facet symbol from the .so but for
some reason, see Description, the linker doesn't find it.

Apparently the problem has more generally to do with extern template things.
Any idea what may be going wrong? Is there something the library should do
here?



More information about the Gcc-bugs mailing list