Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2004-09-07 00:19:54 +0400
committerMiguel de Icaza <miguel@gnome.org>2004-09-07 00:19:54 +0400
commit54c1054514c577643c7f52431faceb293b6f328a (patch)
treeac2375baa29283994e54559cf59bb92a76ae3e3b /mcs
parent5a41ca2bb9a9d684a50317cdc68e34d1695277dd (diff)
2004-09-06 Miguel de Icaza <miguel@ximian.com>
* expression.cs: Report errors with unsafe pointers, fixes #64896 svn path=/trunk/mcs/; revision=33446
Diffstat (limited to 'mcs')
-rwxr-xr-xmcs/mcs/ChangeLog4
-rwxr-xr-xmcs/mcs/expression.cs4
2 files changed, 8 insertions, 0 deletions
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog
index 3623b8a65bb..4d5f38a87f7 100755
--- a/mcs/mcs/ChangeLog
+++ b/mcs/mcs/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-06 Miguel de Icaza <miguel@ximian.com>
+
+ * expression.cs: Report errors with unsafe pointers, fixes #64896
+
2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
* expression.cs: Pointer arith always needs to do a conv.i
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index 98905c88978..0f7ea6e15d9 100755
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -6772,6 +6772,10 @@ namespace Mono.CSharp {
return null;
}
+ if (typearg.IsPointer && !ec.InUnsafe){
+ UnsafeError (loc);
+ return null;
+ }
CheckObsoleteAttribute (typearg);
type = TypeManager.type_type;