[Mono-dev] "fixed" as modifier

Marek Safar marek.safar at seznam.cz
Mon Jul 24 17:43:26 EDT 2006


Hello Jakob,

This is not a conflict between ECMA and Mono implementation but as Miguel
wrote it is kind of "non-standardized" feature. I hope that next version of
C# standard will update appropriate section to reflect this changes.

Regards,
Marek
> Hi Mono list,
>
> I'm currently writing a C# LL parser for KDevelop, and use the numerous Mono 
> source files as test cases for the parser. I've mainly been following the
> C# specification, and found something in the Mono sources conflicting with it:
>
> In mcs/tests/gtest-166.cs, there are field declarations where "fixed" is not 
> used as statement, but as modifier for the variable. Quote:
>
> public unsafe struct TestNew {
>     private fixed char test_1 [128];
>     public fixed bool test2 [4];
>
>     public fixed int T [2];
>     public fixed bool test20 [4], test21 [40];
>
>     (...)
> }
>
> Similar code is also found in mcs/tests/test-466.cs, and both were written by 
> Marek Safar, whom I am cc'ing on this. (g)mcs is successfully compiling this.
> But the "fixed" keyword is only specified as part of the fixed statement, not 
> as variable modifier. (Both in the C# 1.0 and 2.0 specs.)
> So, seen from an ECMA point of view, this code is invalid.
>
> Should this be compilable even if it's not specified? Is it a mono bug?
> Can someone tell me more about this?
>
> (Please cc me, I'm not on the list.)
>
> Thanks for clearing this up,
>   Jakob
>
>   




More information about the Mono-devel-list mailing list