diff options
author | Miguel de Icaza <miguel@gnome.org> | 2004-09-07 00:19:54 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2004-09-07 00:19:54 +0400 |
commit | 54c1054514c577643c7f52431faceb293b6f328a (patch) | |
tree | ac2375baa29283994e54559cf59bb92a76ae3e3b /mcs | |
parent | 5a41ca2bb9a9d684a50317cdc68e34d1695277dd (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-x | mcs/mcs/ChangeLog | 4 | ||||
-rwxr-xr-x | mcs/mcs/expression.cs | 4 |
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; |