[Mono-bugs] [Bug 49011][Min] Changed - mcs does not report CS0221

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Apr 23 12:04:52 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 marek.safar at seznam.cz.


--- shadow/49011	2005-04-23 09:40:10.000000000 -0400
+++ shadow/49011.tmp.11519	2006-04-23 12:04:52.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 49011
 Product: Mono: Compilers
 Version: unspecified
 OS: Debian Woody
 OS Details: 
-Status: NEW   
+Status: RESOLVED   
+Resolution: FIXED
 Severity: Unknown
 Priority: Minor
 Component: C#
 AssignedTo: miguel at ximian.com                            
 ReportedBy: vargaz at freemail.hu               
 QAContact: mono-bugs at ximian.com
@@ -45,6 +45,26 @@
 cast of a constant allowed in this case, and when not). 
 If this is a bug in CSC, the fix is very simple, the code lives in
 Mono.CSharp.Cast.TryReduce () (defined in expression.cs) and we just
 need to repeat the pattern for double and float that we do for the
 other integral types.
+------- Additional Comments From marek.safar at seznam.cz  2006-04-23 12:04 -------
+Fixed in SVN.
+The "issue" with 2047 is Microsoft bug and will be fixed in next version.
+The nature of the problem illustrates this
+class C {
+static void Main () {
+const double d = 2047; // 7FF
+const double d2 = 524287; // 7FFFF
+const double d3 = 34359738367; // 7FFFFFFFF
+System.Console.WriteLine ((byte)d);
+System.Console.WriteLine ((char)d2);
+System.Console.WriteLine ((uint)d3);
+Non of the casts report any error until values are increased by 1

More information about the mono-bugs mailing list