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

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 23 16:48:25 EDT 2005


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 atsushi at ximian.com.

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

--- shadow/53974	2005-08-23 16:00:13.000000000 -0400
+++ shadow/53974.tmp.2404	2005-08-23 16:48:25.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 53974
 Product: Mono: Compilers
 Version: unspecified
 OS: All
 OS Details: tested on both RH9 and WinXP
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: FIXED
 Severity: Unknown
 Priority: Wishlist
 Component: C#
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: spouliot at videotron.ca               
 QAContact: mono-bugs at ximian.com
@@ -56,6 +56,22 @@
 Created an attachment (id=15624)
 proposed fix
 
 
 ------- Additional Comments From miguel at ximian.com  2005-08-23 16:00 -------
 approved, please apply
+
+------- Additional Comments From atsushi at ximian.com  2005-08-23 16:48 -------
+I checked in this "a bit modified" patch as r48761.
+
+Actually value range check should be done for negative ranges. Thus
+the actual comparison became as below:
+
+return type == TypeManager.sbyte_type && (value >= 0x80 || value <
+-0x80) ||
+	type == TypeManager.byte_type && value >= 0x100 ||
+	type == TypeManager.short_type && (value >= 0x8000 || value < -0x8000) ||
+	type == TypeManager.ushort_type && value >= 0x10000 ||
+	type == TypeManager.int32_type && (value >= 0x80000000 || value <
+-0x80000000) ||
+	type == TypeManager.uint32_type && value >= 0x100000000;
+


More information about the mono-bugs mailing list