[Mono-bugs] [Bug 66777][Nor] Changed - wrong CS0642 warning

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 24 Nov 2004 14:57:59 -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 miguel@ximian.com.

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

--- shadow/66777	2004-11-24 12:26:54.000000000 -0500
+++ shadow/66777.tmp.2382	2004-11-24 14:57:59.000000000 -0500
@@ -91,6 +91,26 @@
 
 this one and only case where we should report warning for "while".
 Simply ';' is most likely dirty in this code.
 
 but we report this warning also for your code which is wrong.
 
+
+------- Additional Comments From miguel@ximian.com  2004-11-24 14:57 -------
+Hello Marek,
+
+     Although technically:
+
+     while (xxx) 
+        ;
+
+     Is valid code (and the indentation shows that the intent of the
+while loop is on the xxxx itself) the problem is that it is common
+to write code like this:
+
+     while (xxxx);
+         something;
+
+     Which is what the warning catches.  This matches exactly the
+behavior of C and C++ compilers that warn about an empty statement.
+
+