[Mono-bugs] [Bug 76665][Nor] New - Missing CS0162, unreachable code detected

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Nov 10 12:03:15 EST 2005


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 marek.safar at seznam.cz.

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

--- shadow/76665	2005-11-10 12:03:15.000000000 -0500
+++ shadow/76665.tmp.25843	2005-11-10 12:03:15.000000000 -0500
@@ -0,0 +1,46 @@
+Bug#: 76665
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: marek.safar at seznam.cz               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Missing CS0162, unreachable code detected
+
+using System;
+
+public class Driver
+{
+	public static void Main ()
+	{
+		int yyTop = 0;
+		for (; ; ++yyTop) {
+			if (yyTop > 0)
+				break;
+			else
+				return;
+		}
+	}
+}
+
+Actual Results:
+
+No warning
+
+Expected Results:
+
+warning CS0162: Unreachable code detected.
+
+because `++yyTop' is unreachable
+
+
+Additional Information:


More information about the mono-bugs mailing list