This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: front-end that translate C++ to C
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: "Vladimir A. Merzliakov" <wanderer at rsu dot ru>
- Cc: Chris Lattner <sabre at nondot dot org>, Yi-kwon Hwang <neo at ropas dot snu dot ac dot kr>, gcc at gnu dot org
- Date: Mon, 25 Jul 2005 13:36:39 -0400
- Subject: Re: front-end that translate C++ to C
- References: <42E44D1B.7070605@ropas.snu.ac.kr> <009601c590ff$dda893c0$10fcd0c3@cc.rsu.ru>
On Mon, 2005-07-25 at 14:01 +0400, Vladimir A. Merzliakov wrote:
> > Hi all,
> >
> > Are there any open-source(or free) front-end which translates C++ to C?
> > I could find some commercial things - Comeau, AT&T Cfront, etc., but
> > these have many limitations(especially, It's too difficult to get cfront
> > because there are few cfront-based compiler at present)
> LLVM ( http://llvm.cs.uiuc.edu/ ) ?
>
> It use modified gcc 3.4 as C/C++ frontend and it can emits portable C code.
Depends what you mean by portable.
You can't take the output of the gcc llvm frontend on one platform, and
run it on another, like cfront could.
The sizes, alignments, etc, of things will be different, where people
use sizeof(x), etc, in their code.
Unless you hacked up the C frontend to give you sizeof_expr, etc.
Chris?
--Dan