[Issue 23475] New: Wrong printf deprecation message with ulong/long

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 10 18:15:28 UTC 2022


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

          Issue ID: 23475
           Summary: Wrong printf deprecation message with ulong/long
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: nick at geany.org

On my Windows 8 system:

        pragma(msg, size_t.sizeof); // 4
        pragma(msg, ulong.sizeof);  // 8
        printf("%lu", ulong.init);

printfulong.d(33): Deprecation: argument `0LU` for format specification `"%lu"`
must be `uint`, not `ulong`

Surely %lu is the correct format specifier for ulong?!

Same for long:
        printf("%ld", long.init);

printfulong.d(34): Deprecation: argument `0L` for format specification `"%ld"`
must be `int`, not `long`

--


More information about the Digitalmars-d-bugs mailing list