Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Compiling ANSI C on non-ANSI C environment Message-ID: <14806@smoke.brl.mil> Date: 10 Jan 91 16:10:54 GMT References: <2865@hsi86.hsi.com> <14824@goofy.megatest.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 15 In article <14824@goofy.megatest.UUCP> djones@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.