www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14178] New: C++ linux name mangling does not handle standard


          Issue ID: 14178
           Summary: C++ linux name mangling does not handle standard
                    abbreviations for const types
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: chatelet.guillaume gmail.com

There is a name mangling issue in dmd related to the compression of usual stl
types when the type is const
eg. dmd will mangle 'std::vector<int>::size() const' as
'_ZNK3std6vectorIiSaIiEE4sizeEv' where it should be mangled
'_ZNKSt6vectorIiSaIiEE4sizeEv'. Note 'std' is being compressed into 'St'.

I believe this is coming from
which tests only the non const type pattern.
According to
http://mentorembedded.github.io/cxx-abi/abi.html#mangling-compression this
substitution seems illegal "Note that substitutable components are the
represented symbolic constructs, not their associated mangling character
This lead to undefined reference when linking.

Feb 14 2015