www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/08/12:28:25

Message-ID: <009a01be81dd$0314c180$12d098cd@dean.co.alachua.fl.us>
From: "Dean Limbaugh" <edl AT ns1 DOT co DOT alachua DOT fl DOT us>
To: <djgpp AT delorie DOT com>
Subject: Re: Generate c code from c++?
Date: Thu, 8 Apr 1999 12:29:44 -0400
MIME-Version: 1.0
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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019