www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21817] New: std.format: %u on integer does not print unsigned

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 puremagic.com
          Reporter: bugzilla bernis-buecher.de

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

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

--
Apr 10