Article View: misc.wanted
Article #2709Re: ANSI C to pre-ANSI translator
From: It takes a clear mind to make it
Date: Mon, 16 May 1988 04:35
Date: Mon, 16 May 1988 04:35
22 lines
1541 bytes
1541 bytes
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
Technical Details
Message-ID:
<2089@rtech.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!mailrus!ames!amdahl!rtech!llama!davebReferences:
<1219@ssc.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!mailrus!ames!amdahl!rtech!llama!daveb From: daveb@llama.rtech.UUCP (It takes a clear mind to make it) Newsgroups: misc.wanted,comp.lang.c Subject: Re: ANSI C to pre-ANSI translator Keywords: ANSI C, translator Message-ID: <2089@rtech.UUCP> Date: 16 May 88 04:35:06 GMT References: <1219@ssc.UUCP> Sender: news@rtech.UUCP Reply-To: daveb@rtech.UUCP (It takes a clear mind to make it) Distribution: na Organization: Relational Technology, Inc. Alameda, CA Lines: 22