http://d.puremagic.com/issues/show_bug.cgi?id=9844
--- Comment #4 from [email protected] 2013-04-03 22:10:50 PDT --- (In reply to comment #3) > The mistake only happens when a and b are initialised to the same negative > value. > > In light of that and after some perusing of the asm generated, it appears that > dmd goes "-1 == -1" and uses the same value for a as for b, except of course > that doesn't work because of the different sign bit positions for int and > long. Yes, you're right, as demonstrated in this program: import std.stdio; void main() { int a = -2; long b = -1; long c = -2; writeln(a); // -2 writeln(b); // -1 writeln(c); // 2^32-2 } I suppose I should now find a better title for this issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
