Bug 20645 – printf deprecation for width + precision

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-03-07T13:25:08Z
Last change time
2020-03-12T04:15:41Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2020-03-07T13:25:08Z
As found in DMDs runnable/dhry.d: ------------------------------------ double Microseconds, printf ("%7.1lf \n", Microseconds); ------------------------------------ runnable\dhry.d(615): Deprecation: format specifier `"%7.1lf"` is invalid
Comment #1 by dlang-bot — 2020-03-07T14:47:38Z
@Luhrel created dlang/dmd pull request #10876 "Fix issue 20645" fixing this issue: - Fix issue 20645 https://github.com/dlang/dmd/pull/10876
Comment #2 by moonlightsentinel — 2020-03-07T14:55:46Z
Nevermind, this deprecation is valid as only L (not l) is allowed for floating point numbers according to https://www.cplusplus.com/reference/cstdio/printf/
Comment #3 by r.sagitario — 2020-03-07T17:17:59Z
Comment #4 by bugzilla — 2020-03-12T04:14:33Z
The relevant Standard is C99 7.9.16. Please do not defer to online rewrites of the Standard, as they are sloppy in the subtle details.
Comment #5 by dlang-bot — 2020-03-12T04:15:41Z
dlang/dmd pull request #10876 "Fix issue 20645 - printf deprecation for width + precision" was merged into master: - 6e0745fdb4ba823e711a1ca13abd6f9063b69393 by Luhrel: Fix issue 20645 - printf deprecation for width + precision https://github.com/dlang/dmd/pull/10876