[Mono-bugs] [Bug 53974][Wis] New - We do not report CS0652 warnings (Comparison to integral constant is useless)
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 email@example.com.
--- 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 @@
+OS Details: tested on both RH9 and WinXP
+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
+> 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?
+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.