fyl@ssc.UUCP (Phil Hughes) (05/14/88)
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? Thanks. -- Phil uunet!pilchuck!ssc!fyl
daveb@llama.rtech.UUCP (It takes a clear mind to make it) (05/16/88)
In article <1219@ssc.UUCP> fyl@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@rtech.uucp