[Mono-bugs] [Bug 38674][Nor] Changed - TimeSpan.MinValue.Negate () does not throw

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 21:57:04 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=38674

--- shadow/38674	2003-12-23 21:37:40.000000000 -0500
+++ shadow/38674.tmp.11403	2003-12-23 21:57:04.000000000 -0500
@@ -129,6 +129,14 @@
     IL_0010:  call       void [mscorlib]System.Console::WriteLine
 (int64)
     IL_0015:  ldloc.1
     IL_0016:  call       void [mscorlib]System.Console::WriteLine
 (int64)
     IL_001b:  ret
+
+------- Additional Comments From bmaurer@users.sf.net  2003-12-23 21:57 -------
+According to Partition III, 3.50;
+
+Negation of integral values is standard twos complement negation. In 
+particular, negating the most negative number (which does not have a 
+positive counterpart) yields the most negative number. To detect this 
+overflow use the sub.ovf instruction instead (i.e. subtract from 0).