[Mono-bugs] [Bug 60591][Maj] New - Implicit cast of void pointer

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 22 Jun 2004 18:40:13 -0400 (EDT)


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 dge@softec.st.

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

--- shadow/60591	2004-06-22 18:40:13.000000000 -0400
+++ shadow/60591.tmp.339	2004-06-22 18:40:13.000000000 -0400
@@ -0,0 +1,50 @@
+Bug#: 60591
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dge@softec.st               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Implicit cast of void pointer
+
+Description of Problem:
+To make it short, casting a void pointer to any type not implementing an
+implicit cast operator should report error CS0029 (Cannot implicitly
+convert type 'void*' to ...). Check ECMA-334, chapitre 25.4 for full
+details. Any pointer to void * is implicit but the reverse is not true.
+
+Steps to reproduce the problem:
+Compile the following code with -unsafe:
+using System;
+
+unsafe class A {
+    public static void Main()
+    {
+         void *p = null;
+         char *c = null;
+         c = p;
+    }
+}
+
+Actual Results:
+No error
+
+Expected Results:
+error CS0029: Cannot implicitly convert type 'void*' to 'char *'
+csc provide such result.
+
+How often does this happen? 
+Always
+
+Additional Information:
+Mcs-0.96 exhibit the problem.
+Already present in 0.30.