[Mono-bugs] [Bug 77869][Nor] Changed - Unreachable code multi bug

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Mar 21 18:49:50 EST 2006


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 martin at ximian.com.

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

--- shadow/77869	2006-03-21 18:49:01.000000000 -0500
+++ shadow/77869.tmp.22930	2006-03-21 18:49:50.000000000 -0500
@@ -14,6 +14,35 @@
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: Unreachable code multi bug
 
 Collecting all bugs related to unreachable code here.
+
+------- Additional Comments From martin at ximian.com  2006-03-21 18:49 -------
+From bug #76471:
+
+======
+// Compiler options: -warnaserror
+
+// This ensures that any "unreachable code" warning will error out
+// rather than generate invalid IL
+
+class Foo
+{
+	public static int y = 1;
+	public static int f () { return 0; }
+	public static int Main ()
+	{
+		int x;
+
+		do {
+			x = f ();
+			if (x != 0)
+				continue;
+			return 0;
+		} while (x > y);
+
+		return 1;
+	}
+}
+======


More information about the mono-bugs mailing list