Re: [Mono-dev] gmcs bug with unsafe code

2008-08-28 Thread Marek Safar
Hello Dan,
>
> Hi,
>
> I’ve been trying out gmcs, running on Ubuntu 8.04 amd64 and have 
> discovered a rather annoying fault:
>
> When compiling classes containing statements such as:
>
> namespace YYY {
>
> class XXX {
> private unsafe byte *_data;
>
> public unsafe byte *GetData() { return _data; }}
>
> }
>
> }
>
> The compiler will notify of a failure:
>
> error CS3003: Type of `YYY.XXX._data' is not CLS-compliant
>
Thanks for the report. This issue has been fixed.

Please use Mono bugzilla next time for C# compiler bug reports.

Regards
Marek
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] gmcs bug with unsafe code

2008-08-28 Thread Federico Di Gregorio
Il giorno gio, 28/08/2008 alle 04.52 +0300, Dan Shechter ha scritto:
> Hi,
> 
> I’ve been trying out gmcs, running on Ubuntu 8.04 amd64 and have
> discovered a rather annoying fault:
> 
>  
> 
> When compiling classes containing statements such as:
> 
>  
> 
> namespace YYY {
> 
> class XXX {
> private unsafe byte *_data;
> 
> public unsafe byte *GetData() { return _data; }}
> 
> }
> 
> }
> 
>  
> 
> The compiler will notify of a failure:
> 
> error CS3003: Type of `YYY.XXX._data' is not CLS-compliant

With mono 1.9.1, passing the -unsafe switch to the compiler it works
here (after fixing the extra brace).

federico

-- 
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer[EMAIL PROTECTED]
INIT.D Developer   [EMAIL PROTECTED]
  The number of the beast: vi vi vi. -- Delexa Jones


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] gmcs bug with unsafe code

2008-08-27 Thread Dan Shechter
Hi,

I've been trying out gmcs, running on Ubuntu 8.04 amd64 and have discovered
a rather annoying fault:

 

When compiling classes containing statements such as:

 

namespace YYY {

class XXX {
private unsafe byte *_data;

public unsafe byte *GetData() { return _data; }}

}

}

 

The compiler will notify of a failure:

error CS3003: Type of `YYY.XXX._data' is not CLS-compliant

 

and immediately fault with:

Internal compiler error at ./XXX.cs(64,25):: exception caught while emitting
MethodBuilder [XXX:: GetData]

 

Unhandled Exception: System.ArgumentException: Key duplication when adding:
System.Byte*

  at System.Collections.Hashtable.PutImpl (System.Object key, System.Object
value, Boolean overwrite) [0x0]

  at System.Collections.Hashtable.Add (System.Object key, System.Object
value) [0x0]

  at Mono.CSharp.AttributeTester.IsClsCompliant (System.Type type) [0x0]

  at Mono.CSharp.MethodCore.VerifyClsCompliance () [0x0]

  at Mono.CSharp.Method.VerifyClsCompliance () [0x0]

  at Mono.CSharp.MemberCore.Emit () [0x0]

  at Mono.CSharp.InterfaceMemberBase.Emit () [0x0]

  at Mono.CSharp.MethodOrOperator.Emit () [0x0]

  at Mono.CSharp.Method.Emit () [0x0]

 

turning off cls checks with "-clscheck-" passed to gmcs will go around this
problem.

 

I will file an official bug report.

 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list