[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Is the C compiler a CLS extender?

From: Rhys Weatherley
Subject: Re: [DotGNU]Is the C compiler a CLS extender?
Date: Fri, 05 Sep 2003 09:42:26 +1000
User-agent: KMail/1.4.3

On Friday 05 September 2003 09:39 am, Mark Easton wrote:
> Just a very quick question, but I've been reading the CLI specs again (I
> know, it'd be healthier to get a social life but those specs send me
> wobbly at the knees) and I'm wondering if the C compiler can actually
> create CLS compliant code or not?  I know it pumps out IL, but I'm
> guessing it can't do much with attributes which I assume means it can't
> actually generate CLS compliant code.

Actually, it has more to do with types than attributes.  The C compiler 
outputs global methods and fields in the "<Module>" type, which are not 
normally going to be accessible to a strict CLS-compatible language.  C 
programs also make heavy use of unsigned types.

Of course, where it makes sense for the C compiler to be CLS-compatible, then 
we will be; e.g. when calling C# code from C.  Unfortunately, Microsoft 
didn't define a CLS profile for languages that lack classes, like C does.  
I'm certainly open to suggestions as to how to make C more CLS-friendly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]