convert c++ to C

Oscar Fuentes
Fri Dec 6 12:22:00 GMT 2002

bjorn rohde jensen <> writes:

> Hi guys,
>   Did the old CFront C++ compiler not translate
> to C first? It is of course a wee bit old....

There is a number of C++ and C compilers that produces C code that
later is passed to a C compiler for generating the object code. Comeau
is one of them. KAI (discontinued) often yields faster executables
than g++, despite the fact that it uses gcc as the C compiler. This is
true even for straight C code (That is, you compile a C source file
with KAI, which generates a different C source file, that is passed to
gcc. You obtain a faster executable than passing the original C source
file to gcc directly).

IIRC, from time to time people discusses on the gcc mailing list the
possibility of making a gcc backend that would produce C code instead
of assembler.


More information about the Gcc-help mailing list