[Mono-bugs] [Bug 60457][Maj] Changed - Wrong compilation giving Unreachable Code warning...
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 21 Jun 2004 11:58:56 -0400 (EDT)
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=60457
--- shadow/60457 2004-06-21 06:13:43.000000000 -0400
+++ shadow/60457.tmp.5986 2004-06-21 11:58:56.000000000 -0400
@@ -67,6 +67,25 @@
Additional Information:
None
------- Additional Comments From miguel@ximian.com 2004-06-19 11:54 -------
Assigned to Martin.
+
+------- Additional Comments From bmaurer@users.sf.net 2004-06-21 11:58 -------
+class Test {
+ static int Main () {
+ bool b = false;
+ while (true) {
+ if (b)
+ break;
+ else
+ break;
+ }
+ }
+}
+
+This is a quick way to test it without relying on a warning (which we
+currently have no way to test automatically). CSC tells us that not
+all paths have a return value. However mcs does not complain because
+it thinks that the loop is basically a while (true) ; loop, and so it
+does not require a return value.