[Mono-bugs] [Bug 66777][Nor] Changed - wrong CS0642 warning
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 25 Nov 2004 07:31:20 -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 marek.safar@seznam.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=66777
--- shadow/66777 2004-11-24 14:57:59.000000000 -0500
+++ shadow/66777.tmp.26457 2004-11-25 07:31:20.000000000 -0500
@@ -111,6 +111,24 @@
something;
Which is what the warning catches. This matches exactly the
behavior of C and C++ compilers that warn about an empty statement.
+
+------- Additional Comments From marek.safar@seznam.cz 2004-11-25 07:31 -------
+Hey Miguel,
+
+It is easy. Your snippets are correct and the bug is that mcs reports
+CS0642 warning for this code too. We should report warning for "while"
+case only when someone wrote code like this
+
+using System;
+
+class X {
+ static void Test (int arg)
+ {
+ while (--arg > 0);
+ { Console.WriteLine ("foo"); }
+ }
+}
+