Bug 21958 – windows: printf check requires mutable pointer for %ls

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2021-05-23T08:03:08Z
Last change time
2024-12-13T19:16:32Z
Assigned to
No Owner
Creator
Rainer Schuetze
Moved to GitHub: dmd#19932 →

Comments

Comment #0 by r.sagitario — 2021-05-23T08:03:08Z
import core.stdc.stdio; void main() { wchar* p = null; printf("%ls\n", p); // compiles const(wchar)* cp = null; printf("%ls\n", cp); // complains } printf_test.d(9): Deprecation: argument `cp` for format specification `"%ls"` must be `wchar_t*`, not `const(wchar)*` printf_test.d(9): Deprecation: argument `cp` for format specification `"%ls"` must be `wchar_t*`, not `const(wchar)*` works if wchar_t is used, but this is just an alias to wchar on Windows.
Comment #1 by robert.schadek — 2024-12-13T19:16:32Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19932 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB