[Mono-bugs] [Bug 72698][Nor] New - mcs expects fixed(...) where it should not be necessary
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 17 Feb 2005 15:41:00 -0500 (EST)
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 m_kretzschmar@gmx.net.
http://bugzilla.ximian.com/show_bug.cgi?id=72698
--- shadow/72698 2005-02-17 15:41:00.000000000 -0500
+++ shadow/72698.tmp.1453 2005-02-17 15:41:00.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 72698
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: m_kretzschmar@gmx.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs expects fixed(...) where it should not be necessary
+
+mcs -unsafe test.cs where test.cs is this:
+
+public struct Foo
+{
+ int x;
+
+ unsafe void bar(Foo *p)
+ {
+ void *r = &p->x;
+ }
+
+ public static void Main() {}
+}
+
+prints this
+
+test.cs(7) error CS0212: You can only take the address of an unfixed
+expression inside of a fixed statement initializer
+Compilation failed: 1 error(s), 0 warnings
+
+Someone on #mono tried csc /unsafe and it compiled cleanly.