[Mono-bugs] [Bug 53974][Wis] New - We do not report CS0652 warnings (Comparison to integral constant is useless)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 6 Feb 2004 10:31:50 -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 spouliot@videotron.ca.

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

--- shadow/53974	2004-02-06 10:31:50.000000000 -0500
+++ shadow/53974.tmp.6921	2004-02-06 10:31:50.000000000 -0500
@@ -0,0 +1,41 @@
+Bug#: 53974
+Product: Mono/Compilers
+Version: unspecified
+OS: All
+OS Details: tested on both RH9 and WinXP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: spouliot@videotron.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: We do not report CS0652 warnings (Comparison to integral constant is useless)
+
+Description of Problem:
+We do not report CS0652 warnings (Comparison to integral constant is useless)
+
+Steps to reproduce the problem:
+1. Compile the attached sample with MCS. No error/warning are reported.
+2. Compile the attached sample with CSC. CS0652 is reported.
+
+
+Actual Results (with MCS):
+# mcs cs0652.cs
+Compilation succeeded
+
+Expected Results:
+> csc cs0652.cs
+cs0652.cs(8,7): warning CS0652: Comparison to integral constant is useless;
+the constant is outside the range of type 'byte'
+
+How often does this happen? 
+Always
+
+Additional Information:
+CSC knows it's useless but doesn't eliminate the condition from the IL
+generated (even with optimization turned on). Don't know for the JIT.