Bug 315897 (MONO64330) - `fixed' should create its own scope
Summary: `fixed' should create its own scope
Status: RESOLVED FIXED
Alias: MONO64330
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-27 17:26 UTC by Jeroen Frijters
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
fix (1.84 KB, patch)
2004-09-10 15:52 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:52:12 UTC


---- Reported by jeroen@sumatra.nl 2004-08-27 10:26:20 MST ----

using System.Runtime.InteropServices;

struct MyStruct
{
  internal int p;
}

class test
{
  int bar;

  unsafe void Method1()
  {
    fixed(void* p = &bar) {}
    fixed(void* p = &bar) {}
  }

  unsafe void Method2(MyStruct* p)
  {
    void* pv = &p->p;
  }
}



---- Additional Comments From bmaurer@users.sf.net 2004-08-29 15:20:40 MST ----

Method 1 is a dup of https://bugzilla.novell.com/show_bug.cgi?id=MONO60620.

Method 2 is new. A simpler test case:

unsafe class X {
	static void Main () {
		int x;
		fixed (void* p = &x) {}
		fixed (void* p = &x) {}
	}
}



---- Additional Comments From rharinath@novell.com 2004-09-10 08:52:36 MST ----

Created an attachment (id=166707)
fix




---- Additional Comments From rharinath@novell.com 2004-09-10 08:53:30 MST ----

Applied to CVS.

Imported an attachment (id=166707)

Unknown operating system unknown. Setting to default OS "Other".