[Mono-bugs] [Bug 66031][Min] New - mcs does not report CS0618 (using warning level 4)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 15 Sep 2004 14:15:12 -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 gert.driesen@pandora.be.

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

--- shadow/66031	2004-09-15 14:15:12.000000000 -0400
+++ shadow/66031.tmp.19863	2004-09-15 14:15:12.000000000 -0400
@@ -0,0 +1,35 @@
+Bug#: 66031
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not report CS0618 (using warning level 4)
+
+mcs (built from cvs head) does not report CS0618 for the following code 
+fragment (when using warning level 4) :
+
+using System;
+
+public class ConsoleStub {
+  public static void Main(string[] args) {
+    try {
+    } catch (Exception e) {
+    }
+  }
+}
+
+When compiling this code fragment using csc (warning level 4), you'll get 
+the following warning :
+
+test.cs(6,7): warning CS0168: The variable 'e' is declared but never used