Author: martin
Date: 2005-04-18 00:50:22 -0400 (Mon, 18 Apr 2005)
New Revision: 43188
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/convert.cs
Log:
**** Merged r41968 from MCS ****
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-04-18 04:50:04 UTC (rev 43187)
+++ trunk/mcs/gmcs/ChangeLog 2005-04-18 04:50:22 UTC (rev 43188)
@@ -1,5 +1,8 @@
2005-03-17 Miguel de Icaza <[EMAIL PROTECTED]>
+ * convert.cs: When converting to a pointer, use the proper Conv.U
+ or Conv.I depending on the source data type.
+
* cs-tokenizer.cs: Make the size for large decimal constants,
fixes #72957.
Modified: trunk/mcs/gmcs/convert.cs
===================================================================
--- trunk/mcs/gmcs/convert.cs 2005-04-18 04:50:04 UTC (rev 43187)
+++ trunk/mcs/gmcs/convert.cs 2005-04-18 04:50:22 UTC (rev 43188)
@@ -1973,13 +1973,15 @@
return new EmptyCast (expr,
target_type);
if (expr_type == TypeManager.sbyte_type
||
- expr_type == TypeManager.byte_type
||
expr_type == TypeManager.short_type
||
- expr_type ==
TypeManager.ushort_type ||
expr_type == TypeManager.int32_type
||
+ expr_type == TypeManager.int64_type)
+ return new OpcodeCast (expr,
target_type, OpCodes.Conv_I);
+
+ if (expr_type ==
TypeManager.ushort_type ||
expr_type ==
TypeManager.uint32_type ||
expr_type ==
TypeManager.uint64_type ||
- expr_type == TypeManager.int64_type)
+ expr_type == TypeManager.byte_type)
return new OpcodeCast (expr,
target_type, OpCodes.Conv_U);
}
if (expr_type.IsPointer){
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches