Bug 318783 (MONO75861) - CS0233 is not reported for using sizeof
Summary: CS0233 is not reported for using sizeof
Status: RESOLVED MOVED
Alias: MONO75861
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-20 16:19 UTC by Gert Driesen
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

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


---- Reported by gert.driesen@pandora.be 2005-08-20 09:19:30 MST ----

mcs does not report error CS0233 when sizeof is not used in an unsafe 
context.

To reproduce, compile the following code snippet:

using System;

public class Test
{
	public static void Main ()
	{
		Console.WriteLine (sizeof (short));
	}
}

Actual result:

Successful compilation

Expected result:

test.cs(7,22): error CS0233: sizeof can only be used in an unsafe context
        (consider using System.Runtime.InteropServices.Marshal.SizeOf)



---- Additional Comments From duncan@ximian.com 2005-08-20 11:50:36 MST ----

This is a duplicate.

*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO75134 ***


Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"