[Mono-bugs] [Bug 38328][Nor] Changed - Byte.Parse doesn't overflow
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Wed, 19 Feb 2003 12:19:25 -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 gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=38328
--- shadow/38328 Wed Feb 19 10:49:36 2003
+++ shadow/38328.tmp.9701 Wed Feb 19 12:19:25 2003
@@ -1,16 +1,16 @@
Bug#: 38328
-Product: Mono/Class Libraries
+Product: Mono/MCS
Version: unspecified
OS: Red Hat 8.0
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
-Component: CORLIB
+Component: Misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: ndrochak@gol.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
Cc:
@@ -27,6 +27,31 @@
public static void Main() {
int OverInt = Byte.MaxValue + 1;
Byte.Parse(OverInt.ToString());
}
}
}
+
+------- Additional Comments From gonzalo@ximian.com 2003-02-19 12:19 -------
+It's an mcs bug.
+The IL generated for:
+----
+using System;
+
+namespace N
+{
+ public class X {
+ public static void Main() {
+ int x = Byte.MaxValue;
+ byte OverInt = checked ((byte) (x + 1));
+ }
+ }
+}
+----
+
+shows that mcs generates:
+add.ovf
+conv.u1
+
+while csc generates:
+add.ovf
+conv.ovf.u1