FW: convert c++ to C

John Love-Jensen eljay@adobe.com
Fri Dec 6 06:18:00 GMT 2002


Hi Daniel,

>Is it possible to automatically translate ANSI-C++ code to ANSI-C using gcc?

Yes, AT&T's Cfront does just that sort of thing.
<http://www.unipress.com/toolkit/cfront.html>

Comeau's C++ also does just that sort of thing.
<http://www.comeaucomputing.com/>

You'd first use Cfront or Comeau to convert your C++ to C, and then use gcc
to compile the "machine generated" C code.

I've used both, I prefer Comeau Computing's compiler front-end.

Nothing against AT&T, after all (I presume) Cfront is the evolutionary
legacy from Stroustrup!

Sincerely,
--Eljay



More information about the Gcc-help mailing list