public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51813] New: -fvisibility=hidden causes std::codecvt members to be undefined
@ 2012-01-10 14:38 sefi@s-e-f-i.de
  2012-01-13 12:03 ` [Bug c++/51813] [4.7 Regression] " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sefi@s-e-f-i.de @ 2012-01-10 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51813
           Summary: -fvisibility=hidden causes std::codecvt members to be
                    undefined
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sefi@s-e-f-i.de


The following program causes undefined symbols when -fvisibility=hidden is
used:

#include <locale>

int main()
{
        std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t>
>(std::locale());
}

g++-4.7 -fvisibility=hidden test.cpp

/tmp/cclBRkzy.o: In function `main':
test.cpp:(.text+0x1d): undefined reference to `std::codecvt<wchar_t, char,
__mbstate_t> const& std::use_facet<std::codecvt<wchar_t, char, __mbstate_t>
>(std::locale const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0-alpha20120107/../../../../x86_64-pc-linux-gnu/bin/ld:
a.out: hidden symbol
`_ZSt9use_facetISt7codecvtIwc11__mbstate_tEERKT_RKSt6locale' isn't defined
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0-alpha20120107/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status

It works with gcc-4.6.2.
use_facet is only an example. I had other functions like do_length, the
destructor, etc. reported as undefined as well.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-01-13 17:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10 14:38 [Bug c++/51813] New: -fvisibility=hidden causes std::codecvt members to be undefined sefi@s-e-f-i.de
2012-01-13 12:03 ` [Bug c++/51813] [4.7 Regression] " paolo.carlini at oracle dot com
2012-01-13 15:59 ` jason at gcc dot gnu.org
2012-01-13 16:41 ` [Bug libstdc++/51813] " jason at gcc dot gnu.org
2012-01-13 16:43 ` paolo.carlini at oracle dot com
2012-01-13 16:53 ` redi at gcc dot gnu.org
2012-01-13 17:01 ` paolo.carlini at oracle dot com
2012-01-13 17:05 ` jason at gcc dot gnu.org
2012-01-13 17:24 ` [Bug c++/51813] " jason at gcc dot gnu.org
2012-01-13 18:10 ` jason at gcc dot gnu.org
2012-01-13 18:40 ` jason at gcc dot gnu.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).