http://d.puremagic.com/issues/show_bug.cgi?id=9331
Summary: incorrect "ulong.max" value Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: g.sa...@yahoo.es --- Comment #0 from Jordi Sayol <g.sa...@yahoo.es> 2013-01-16 23:52:53 PST --- When compiling this code to 64-bit. app.d ---- import std.stdio; void main() { ubyte u1 = cast(byte)-1; byte u2 = cast(short)-1; uint u3 = cast(int)-1; int u4 = cast(long)-1; writefln("%d", u1); writefln("%d", u2); writefln("%d", u3); writefln("%d\n", u4); writefln("long.sizeof: %d ulong.max: %20d", ulong.sizeof, ulong.max); writefln("long.sizeof: %d long max: %20d", long.sizeof, long.max); } ---- Prints this: ---- 255 -1 4294967295 -1 long.sizeof: 8 ulong.max: 4294967295 long.sizeof: 8 long max: 9223372036854775807 ---- "ulong.max" value is incorrect Tested with dmd version 2.056, 2.057, 2.058, 2.059, 2.060 and 2.061 No problem when compiling to 32-bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------