Bug 23247 – Deprecation: argument 0.0L for format specification "%La" must be double, not real
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-07-14T09:17:16Z
Last change time
2022-07-14T16:07:11Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw
Comments
Comment #0 by ibuclaw — 2022-07-14T09:17:16Z
This deprecation message is obviously wrong.
Comment #1 by ibuclaw — 2022-07-14T10:23:43Z
Actually, the `%a` format flag as a "GNU extension" is just broken in general as far as I can tell.
It's treated as a conversion, rather than a flag.
However... the default in C programs is to use the ISO C99 printf/scanf family of functions - I don't see why we are still using the C98 versions in druntime bindings.
Comment #2 by ibuclaw — 2022-07-14T10:36:25Z
As an aside, also broken is the message for "%a[flag]"
Deprecation: argument `& variable` for format specification `"%a"` must be `char*`, not `char**`
Deprecation: argument `& value` for format specification `"%a"` must be `char*`, not `char**`
Wrong, a `char**` is correct.
@ibuclaw created dlang/dmd pull request #14302 "fix Issue 23247 - Deprecation: argument 0.0L for format specification "%La" must be double, not real" fixing this issue:
- fix Issue 23247 - Deprecation: argument 0.0L for format specification "%La" must be double, not real
As we are no longer using the GNU/C89 extensions of scanf(), remove all
GNU_a handling, this fixes the regression in parsing "%La".
https://github.com/dlang/dmd/pull/14302
Comment #5 by dlang-bot — 2022-07-14T16:07:11Z
dlang/dmd pull request #14302 "fix Issue 23247 - Deprecation: argument 0.0L for format specification "%La" must be double, not real" was merged into master:
- 34c520611c191cbd6c7bdf43c181efd9c4e4290c by Iain Buclaw:
fix Issue 23247 - Deprecation: argument 0.0L for format specification "%La" must be double, not real
As we are no longer using the GNU/C89 extensions of scanf(), remove all
GNU_a handling, this fixes the regression in parsing "%La".
https://github.com/dlang/dmd/pull/14302