Bug 23020 – pragma(printf) should warn for %*.s

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-04-15T22:12:41Z
Last change time
2024-12-13T19:22:17Z
Assigned to
No Owner
Creator
moonlightsentinel
See also
https://issues.dlang.org/show_bug.cgi?id=23019
Moved to GitHub: dmd#20089 →

Comments

Comment #0 by moonlightsentinel — 2022-04-15T22:12:41Z
Because it's most likely a typo. The common case is %.*s to print a slice passed as length + ptr. %*.s is equivalent to %*.0s and specifies "Print zero characters from the string padded to a runtime width"
Comment #1 by robert.schadek — 2024-12-13T19:22:17Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20089 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB