dmd
dmd copied to clipboard
Fix Issue 22014 - Make core.stdc.stddef.wchar_t match C++ mangling
Just like we already do in core.stdc.stdint.
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:
- My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
- My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
- I have provided a detailed rationale explaining my changes
- New or modified functions have Ddoc comments (with
Params:andReturns:)
Please see CONTRIBUTING.md for more information.
If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.
Bugzilla references
| Auto-close | Bugzilla | Severity | Description |
|---|---|---|---|
| ✓ | 22014 | normal | Wrong MSVC++ mangling of wchar_t |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#15916"
Blocked by apparently insufficient magic for these special enums, e.g.:
- for the underlying 16-bit
wcharon Windows:core\stdc\wchar_.d(128): Error: cannot implicitly convert expression `65535` of type `int` to `__c_wchar_t` - for the underlying 32-bit
dcharon Linux:std/stdio.d(3248): Error: none of the overloads of template `std.utf.encode` are callable using argument types `!()(__c_wchar_t[1], immutable(dchar))` … std/utf.d(2510): `encode(Flag useReplacementDchar = No.useReplacementDchar)(out dchar[1] buf, dchar c)
The same missing magic also blocks std::wstring from working in D (at least on windows, didn't test other OSes)