[Issue 22014] New: Wrong MSVC++ mangling of wchar_t
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 10 15:17:35 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22014
Issue ID: 22014
Summary: Wrong MSVC++ mangling of wchar_t
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kinke at gmx.net
C++:
```
#include <windows.h>
void wchar_test(wchar_t bla) {}
void wstr_test(LPCWSTR str) {}
```
=> (https://cpp.godbolt.org/z/qGo3roaqh)
?wchar_test@@YAX_W at Z
?wstr_test@@YAXPEB_W at Z
The frontend as of 2.097.0 mangles it as (https://d.godbolt.org/z/vhb96c1j3):
?wchar_test@@YAX_S at Z
?wstr_test@@YAXPEB_S at Z
The bug is
https://github.com/dlang/dmd/blob/a9efb98285713dac64a35e9eb166119d33d5fdc2/src/dmd/cppmanglewin.d#L248.
--
More information about the Digitalmars-d-bugs
mailing list