DMD incorrectly mangles the following function:
extern (C++) void error (const char*, const char*) {}
DMD mangling: __Z5errorPKcS_
GCC mangling: __Z5errorPKcS0_
It has to be at least two parameters, not the first parameter and any of the other parameters have to be const char*.
I don't know if this is the same bug as 4059 but that one doesn't mention const. This is also a blocker for DDMD on Posix.
Apparently I didn't test it against the patch against the trunk last night. :~)
It seems fine now I've rebuilt it.
Comment #6 by luk.wrzosek — 2010-11-12T09:23:30Z
Created attachment 807
Fix for bug 5148 and some other fixes.
This patch fixes also some other issues that I think weren't reported up to now.
In gcc c++ functions with const arguments passed by value are mangled like not const:
void Test(const int, const int) -> _Z4Testii
void Test(const char, const char) -> _Z4Testcc
struct MyStrutType { };
void Test(const MyStructType, const MyStructType) -> _Z4Test12MyStructTypeS_
enum MyEnumType { };
void Test(const MyEnumType, const MyEnumType) -> _Z4Test10MyEnumTypeS_
Without this patch dmd generates const versions.