Ambiguity of erroneous C ++ characters

_ZNSaIwEC1Ev
_ZNSaIwEC2Ev

These two C ++ characters are different, but they are unmarked (using the C ++ filter or a similar utility) in the same form:

std::allocator<wchar_t>::allocator()
std::allocator<wchar_t>::allocator()

Why is that? Could it be a demanger defect or what else?

+4
source share
1 answer

g ++ uses the name change scheme (and other implementation details) specified by Itanium ABI .

In the section on manipulating constructors and destructors, we see:

<ctor-dtor-name> ::= C1 # complete object constructor
                 ::= C2 # base object constructor
                 ::= C3 # complete object allocating constructor
                 ::= D0 # deleting destructor
                 ::= D1 # complete object destructor
                 ::= D2 # base object destructor
  • A “full object constructor”, including C1, is a regular constructor directly used during initialization.
  • " ", C2, . "" , , , , .
  • " ", C3, , operator new. , , g++ .
  • " ", D0, operator delete. , operator delete , .
  • " ", D1, C1 .
  • " ", D2, C2 .

, , , C1 C2 , ++, . , demangling .

, std::allocator<T> , , , g++ - .

+5

Source: https://habr.com/ru/post/1696166/


All Articles