This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12291] New: regression in anonymous namespace variable name mangling


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: regression in anonymous namespace variable name mangling
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phil dot el at wanadoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu

#include <string>
struct extra_images {
  std::string value;
  bool operator()(std::string str) const { return str == value; }
};
struct foo { foo(); };
namespace { foo option_array; }

$ g++ -c tmp.cpp
$ nm  tmp.o | grep option_array
00000000 B _ZN27_GLOBAL__N__ZNKSs7_M_dataEv12option_arrayE

the filename is not encoded in the mangled name, it should imo.
The only _M_data I saw in preprocessed output is the basic_string
member _M_data.

I've got only a small clue why this problem occur, if I remove
the "extern template class basic_string<char>;" in preprocessed
output the filename is now used in the mangled name.

regards,
Philippe Elie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]