[Issue 21817] New: std.format: %u on integer does not print unsigned value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 10 17:34:18 UTC 2021


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

          Issue ID: 21817
           Summary: std.format: %u on integer does not print unsigned
                    value
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at bernis-buecher.de

unittest
{
    assert(format!"%u"(-5) == "4294967291");
}

The result is actually -5 which is not unsigned...

--


More information about the Digitalmars-d-bugs mailing list