Mail Archives: djgpp/1999/04/08/12:28:25
Actually, the first C++ compilers like cfront from ATT translated the C++
code into C and then used the C compiler to build it. It is only in recent
years that native code C++ compilers have come out. Even now, DJGPP/GNU
translates C++ into assembler and the assembles it using as.
-----Original Message-----
From: Christopher Nelson <paradox AT gye DOT satnet DOT net>
To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Thursday, April 08, 1999 9:05 AM
Subject: Re: Generate c code from c++?
>
>
>>Hi, does anyone know how to use djgpp or other tools to
>>generate c code from c++ code?
>
>
>1st, why would you want to? (C++ is nearly as fast, more flexible, and
>usually better for the projects that it's written for than equivalent C
>code.)
>
>Secondly, I've never heard of one. The point of C++ is it's OOP algorithm
>and paradigm. To translate it to C is usually a large, difficult, and
>MANUAL procedure. There's really no way to accurately translate all C++
>programs to C.
>
>There is one caveat to this situation: if the C++ program doesn't take
>advantage of classes, it's usually trivial to translate it. Of course,
then
>it's not really C++, just C being compiled by the C++ compiler.
>
> -={C}=-
>
- Raw text -