digitalmars.D.bugs - [Issue 14178] New: C++ linux name mangling does not handle standard
- via Digitalmars-d-bugs (29/29) Feb 14 2015 https://issues.dlang.org/show_bug.cgi?id=14178
https://issues.dlang.org/show_bug.cgi?id=14178 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 https://github.com/D-Programming-Language/dmd/blob/master/src/cppmangle.c#L453 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 strings." This lead to undefined reference when linking. --
Feb 14 2015