Bug 23249 – Deprecation: argument &p for format specification "%m" must be char*, not char**

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-07-14T11:09:45Z
Last change time
2022-07-19T17:30:13Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2022-07-14T11:09:45Z
This deprecation message is wrong, the %m specifier needs to accept a `char**` as it must dynamically allocate it. On an implementation note, it's also not a GNU, but a POSIX.1-2008 extension. https://pubs.opengroup.org/onlinepubs/9699919799/functions/fscanf.html
Comment #1 by ibuclaw — 2022-07-14T11:29:45Z
The implementation of `%m` is also wrong, it accepts `%m` as a naked specifier, when actually it is a modifier for a conversion format. e.g: `%ms`, `%m[range]`, plus wchar equivalents `%mls` and `%ml[range]`.
Comment #2 by dlang-bot — 2022-07-15T22:24:58Z
@ibuclaw created dlang/dmd pull request #14307 "fix Issue 23249 - Deprecation: argument &p for format specification "%m" must be char*, not char**" fixing this issue: - fix Issue 23249 - Deprecation: argument &p for format specification "%m" must be char*, not char** https://github.com/dlang/dmd/pull/14307
Comment #3 by dlang-bot — 2022-07-19T17:30:13Z
dlang/dmd pull request #14307 "fix Issue 23249 - Deprecation: argument &p for format specification "%m" must be char*, not char**" was merged into master: - e0183cd392208a72b625de840b70094dde1ce281 by Iain Buclaw: fix Issue 23249 - Deprecation: argument &p for format specification "%m" must be char*, not char** https://github.com/dlang/dmd/pull/14307