[Issue 22014] Wrong MSVC++ mangling of wchar_t

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 15 05:25:00 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=22014

elpenguino+D at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elpenguino+D at gmail.com

--- Comment #2 from elpenguino+D at gmail.com ---
this appears to be caused by dmd not recognizing wchar_t and instead mangling
it as the wchar/dchar it is aliased to. from what I gather, this was intended
to be fixed by an abandoned plan for 2.085.0/2.086.0
(https://github.com/dlang/dmd/pull/9029,
https://github.com/dlang/dmd/pull/9130,
https://github.com/dlang/druntime/pull/2390) that never came to fruition,
despite its inclusion in the 2.085.0 changelog. similarly, the related
-extern-std switch support never materialized...

The mangler does recognize a __c_wchar_t type, but that isn't documented or
defined anywhere in dmd and requires a definition similar to `enum __c_wchar_t
: wchar` or dchar in user code. unfortunately, core.stdcpp.string's
basic_string won't work with this, causing std::wstring support to be just out
of reach

--


More information about the Digitalmars-d-bugs mailing list