<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi Dale,</DIV>
<DIV> </DIV>
<DIV>Thank you for your comments. (BTW, I'm here in San Jose - I see you're at Apple).</DIV>
<DIV> </DIV>
<DIV>I'm simply looking for tool that will accept C/C++ source and generate machine code for a virtual machine, the ultimate goal being to use the system as a teaching tool.</DIV>
<DIV> </DIV>
<DIV>Any suggestions would be appreciated.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>M. McDonnell</DIV>
<DIV><BR><BR>--- On <B>Sat, 10/11/08, Dale <SPAN><SPAN>Johannesen</SPAN></SPAN> <I><dalej@apple.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Dale Johannesen <dalej@apple.com><BR>Subject: Re: [LLVMdev] C++ to C?<BR>To: "LLVM Developers Mailing List" <llvmdev@cs.uiuc.edu><BR>Cc: "Dale Johannesen" <dalej@apple.com>, "Michael" <MichaelDMcDonnell@yahoo.com><BR>Date: Saturday, October 11, 2008, 12:33 PM<BR><BR><PRE>On Oct 11, 2008, at 12:49 AM, Duncan Sands wrote:
> On Friday 10 October 2008 20:29:49 Michael wrote:
>> What command and options should be used to convert C++ to C?
>
> Try this:
>
> llvm-gcc -c -O3 -emit-llvm file.cpp -o - | llc -march=c -o -
>
> It should spray C code to standard out.
Bear in mind that if you use features from the C++ library, you are
still going to need a C++ library.
llvm does not try to translate iostream into stdio calls or anything
like that.
</PRE></BLOCKQUOTE></td></tr></table><br>