[Mono-bugs] [Bug 76256][Nor] Changed - UIntPtr should be converted to int

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jan 17 12:43:36 EST 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 kornelpal at hotmail.com.

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

--- shadow/76256	2006-01-17 12:37:59.000000000 -0500
+++ shadow/76256.tmp.1713	2006-01-17 12:43:36.000000000 -0500
@@ -62,6 +62,18 @@
 
 That is int -> ulong -> UIntPtr conversion.
 
 There are some other undocumented behaviors of C# compiler that are 
 copied from MS csc and I don't think that allowing this conversion 
 breaks anything or produces unreliable code.
+
+------- Additional Comments From kornelpal at hotmail.com  2006-01-17 12:43 -------
+Also note that you sated that int -> ulong -> UIntPtr cannot be 
+performed but it can be performed in fact.
+
+The following code compiles using csc as well as using mcs and 
+produces the same IL code with both compilers as I quoted previously.
+
+Code:
+int var1 = 2;
+UIntPtr var2 = (UIntPtr)(ulong)var1;
+


More information about the mono-bugs mailing list