[Mono-dev] Why is UnmanagedType_80 required?

Kornél Pál kornelpal at hotmail.com
Wed Aug 31 05:04:02 EDT 2005

>> According to my experiences using no ArraySubType has the same result as
>> ArraySubType = (UnmanagedType)80 on mcs and csc.exe as well.
>> Could someone tell me please why UnmanagedType_80 is required?
>There was a bug in ancient versions of mcs wrt. constant folding in
>attribute arguments.  We needed to declare an explicit enumeration
>constant, and use that instead.

I think in this case we could simply eliminate UnmanagedType_80 in favour of
using no ArraySubType as I think we support those ancient versions no more.

>The actual reason for using '(UnmanagetType) 80': probably corcompare.

Using no ArraySubType and using ArraySubType = (UnmanagedType)80 results in
the same binary file. And we have no enumeration member (except
BOOTSTRAP_WITH_OLDLIB) but I think corcompare uses the full version of
assembly. So it cannot map value 80 to any enumeration member.

So the question is that do we need (UnmanagedType)80 in our standard build
procedure or in any tricky situations? Because if we only need it in
ancient, non-supported situations I think we should remove it.


More information about the Mono-devel-list mailing list