[Issue 21958] New: windows: printf check requires mutable pointer for %ls
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 23 08:03:08 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21958
Issue ID: 21958
Summary: windows: printf check requires mutable pointer for %ls
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: r.sagitario at gmx.de
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.
--
More information about the Digitalmars-d-bugs
mailing list