Bug 19395 – extern(C++) mangling: posix mangling does not support `S_` token

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-11-13T05:24:25Z
Last change time
2019-06-14T01:50:32Z
Keywords
C++
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2018-11-13T05:24:25Z
Posix mangling uses an `S_`, `S0_`, `S1_`, ... token to repeat the prior element in the mangled name. Without supporting this, we fail to mangle functions with repeated arguments: void fun(wchar x, wchar y, bool b); <-- __Z3funDsS_b (ie; Ds is repeated once)
Comment #1 by pro.mathias.lang — 2019-06-14T01:50:32Z
DMD does substitution. However substitution is not done on basic types. The following C++ code: void fun(wchar_t x, wchar_t y, bool b) {} Mangles to: __Z3funwwb On my machine (OSX, so Clang). Hit me up on Slack if there's some POSIX mangling issue you need to troubleshoot.