[cfe-dev] Rewrite Objective-C to C

Ted Kremenek kremenek at apple.com
Mon Nov 10 08:33:20 PST 2008





On Nov 10, 2008, at 8:27 AM, Chris Lattner <clattner at apple.com> wrote:

> On Nov 10, 2008, at 6:41 AM, Dado Colussi wrote:
>> I am new to this list, and my inexperience in compiler technology is
>> likely to shine in my questions. Here we go...
>>
>> I am interested in trying to use clang to convert Objective-C code to
>> C, and compiling the generated C code with 3rd party compiler. I have
>> managed to convert and compile a very simple hello application on my
>> Mac using Apple's runtime after having tweaked the generated code. I
>> have failed with anything more complex than the hello in one file.
>>
>> I wonder:
>> * How realistic and feasible my approach is?
>> * How mature the rewrite code in clang is?
>> * Is there enough community interest to actually make the rewrite  
>> code
>> complete?
>
> Hi Dado,
>
> This is realistic, but you will need to translate all the runtime
> libraries and headers also.  The Objective-C rewriter only "lowers"
> ObjC to C

IIRC, it translates to C++, not C.



More information about the cfe-dev mailing list