Compiling ANSI C on non-ANSI C environment

Doug Gwyn gwyn at smoke.brl.mil
Fri Jan 11 03:10:54 AEST 1991


In article <14824 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
>I'm wondering why there is seems to be no ANSI-C to C compiler around,
>a la "cfront", the C++ to C compiler. It would seem to be a natural.
>There are a couple of things that would have to be kluged up a little --
>passing floats rather than doubles as parameters, for example -- but
>that's no big deal.

First of all, the ANSI-C to C translator is called "cat" on UNIX systems.
Of course, what you really meant was a translator from standard C to some
flavor of pre-ANSI C; unfortunately there are numerous incompatible
dialects of the latter.  Even if you narrow that down to be "4.3BSD PCC's
dialect of C", the translation is by no means trivial -- a conforming
implementation would be about as difficult to obtain that way as writing
a genuine compiler.  It is not clear that a non-conforming attempt would
be worth all that much.



More information about the Comp.lang.c mailing list