Bug 1762 – Wrong name mangling for pointer args of free extern (C++) functions
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-01-01T22:35:00Z
Last change time
2015-06-09T01:14:23Z
Keywords
link-failure
Assigned to
bugzilla
Creator
torhu
Comments
Comment #0 by torhu — 2008-01-01T22:35:41Z
In C++:
void dfunc(char*);
In D:
extern (C++) void dfunc(char* s)
{
puts(s);
}
dfunc is mangled as follows:
In C++: ?dfunc@@YAXPAD@Z
In D: ?dfunc@@YAXPAX@Z
I also tried this with an int pointer, which didn't work either. Verified in both 2.008 and 2.009.
The name mangling seems to be correct for methods.