[Issue 23020] New: pragma(printf) should warn for %*.s

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 15 22:12:41 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23020

          Issue ID: 23020
           Summary: pragma(printf) should warn for %*.s
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: moonlightsentinel at disroot.org

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"

--


More information about the Digitalmars-d-bugs mailing list