Bug 16289 – no extern(C++) mangling for size_t/unsigned long parameters
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2016-07-18T12:06:57Z
Last change time
2020-02-21T02:17:22Z
Keywords
C++, mangling
Assigned to
No Owner
Creator
Martin Nowak
Comments
Comment #0 by code — 2016-07-18T12:06:57Z
The C++ mangler conflates mangling for unsigned, unsigned long, and unsigned long long depending on the target architecture. Those are separate manglings in C++, independent of their target size.
This leads to several linking problems w/ C++ code, in particular when a size_t parameter is involved.
We already have some places in cppmangle where we properly handle Id.__c_long/Id.__c_ulong. This should be extended to size_t parameters in extern(C++) functions. We might also consider to change the size_t declaration to exactly match the C++ definition of the used platform.