Message-ID: <009a01be81dd$0314c180$12d098cd@dean.co.alachua.fl.us> From: "Dean Limbaugh" To: Subject: Re: Generate c code from c++? Date: Thu, 8 Apr 1999 12:29:44 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Reply-To: djgpp AT delorie DOT com 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 To: 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}=- >