[comp.lang.c++] Is there a PD C++ that compiles to C

umace03@doc.ic.ac.uk (M Y Ben Gershon) (07/17/90)

I am looking for a highly portable version of C++ that generates ANSI C as
its 'object code', and is written itself in C, with sources included.  Does
such a product exist?  GNU g++ is no good, as it is part of the GNU gcc,
which ofcourse generates machine code output.  I am looking for a C++ that
can produce output that can be fed DIRECTLY into a good ANSI C compiler.
Such products do exist for Ada (eg Classic-Ada).  Is there one for C????

Michael Ben-Gershon
umace03@doc.ic.ac.uk

pcg@cs.aber.ac.uk (Piercarlo Grandi) (07/19/90)

In article <2106@gould.doc.ic.ac.uk> umace03@doc.ic.ac.uk (M Y Ben
Gershon) writes:

   I am looking for a highly portable version of C++ that generates ANSI C as
   its 'object code', and is written itself in C, with sources included.  Does
   such a product exist?  GNU g++ is no good, as it is part of the GNU gcc,
   which of course generates machine code output.

Ehm, reality far surpasses imagination. I remember having seen an
article that described or hinted that somebody has already done a set of
GNU C/C++ code generator template files that make it generate code for a
"machine" whose assembler is C, i.e. a c.md file.

I see nothing improbable with this, and I reckon it must be equally
possible to have machine description files for machines whose assembler
is Ada, Lisp, etc...

If anybody knows of where to get the C code generation files for GNU
C++: it would be nice if the details were posted...
--
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcsun!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk