This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jan 2012 16:43:12 +0000
- Subject: [Bug libstdc++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined
- Auto-submitted: auto-generated
- References: <bug-51813-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-13 16:43:12 UTC ---
(In reply to comment #3)
> What do we want to do about C library visibility?
We can't redeclare all the types with default visibility, because we don't know
if e.g. mbstate_t is just a typedef.
This appears to fix it, but would it need to be done for any explicit
instantation relying on non-builtin types defined outside libstdc++?
extern template
__attribute__((visibility("default")))
const codecvt<wchar_t, char, mbstate_t>&
use_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);