ANSI C to pre-ANSI translator

It takes a clear mind to make it daveb at llama.rtech.UUCP
Mon May 16 14:35:06 AEST 1988


In article <1219 at ssc.UUCP> fyl at ssc.UUCP (Phil Hughes) writes:
>We have just updated our C class to cover ANSI C.  The class is
>hands-on and our system doesn't have an ANSI compiler.  Before I write
>a quick and dirty translator to basically convert function prototypes
>to old-style function definitions, has someone else already done the
>work?
>

There'd be more to it than that.  At the least you'd need to have the
translator stick casts into every funciton call argument, to deal with
the type conversions that done for you in dpANS.  This would produce
some very ugly Old-C, unless you wanted a much smarter translater that
would only do these casts when necesary.  You'd also need to deal with
preprocessor weirdnesses between dpANSI and say, the UNIX/Reisser CPP.

To a certain degree you'd be writing an ANSI compiler that happened to
spit out C instead of assembler.

Anyone out there:  please post it when you're done (:-).

-dB
{amdahl, cpsc6a, mtxinu, sun, hoptoad}!rtech!daveb daveb at rtech.uucp



More information about the Comp.lang.c mailing list