[Mono-bugs] [Bug 79210][Min] New - cs1522 treated as error rather than warning
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Aug 29 12:35:09 EDT 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 twon33 at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79210
--- shadow/79210 2006-08-29 12:35:09.000000000 -0400
+++ shadow/79210.tmp.724 2006-08-29 12:35:09.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 79210
+Product: Mono: Compilers
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: twon33 at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: cs1522 treated as error rather than warning
+
+Description of Problem: gmcs, mcs report cs1522 as an error rather than a
+warning.
+
+Steps to reproduce the problem:
+
+1) Into test.cs put:
+
+-----
+using System;
+namespace TestProg {
+ class TestProg {
+ public static void Main(string[] args) {
+ int i = 0;
+ switch(i) { }
+ }
+ }
+}
+-----
+
+2) mcs test.cs
+
+Actual Results:
+
+test.cs(6,16): error CS1522: Empty switch block
+
+Expected Results:
+
+test.cs(6,16): warning CS1522: Empty switch block
+
+How often does this happen? Every time.
+
+Additional Information: You'd never see this in hand-written code, but I
+have a library that is auto-generated and periodically spits up empty
+switch blocks. Microsoft's C# compiler treats this as a warning; I'd expect
+the same behavior here.
More information about the mono-bugs
mailing list