Path: utzoo!attcan!uunet!fernwood!apple!motcsd!mcdcup!mcdchg!tellab5!mtcchi!levy From: levy@mtcchi.uucp (2656-Daniel R. Levy(0000000)0000) Newsgroups: comp.lang.c Subject: Re: Explicit cast of NULL (was Re: Short-circuiting conditions) Message-ID: <1990Jul1.235042.28958@mtcchi.uucp> Date: 1 Jul 90 23:50:42 GMT References: <4556@thebes.Thalatta.COM> <111287@linus.mitre.org> <8860@crdgw1.crd.ge.com> <807@mwtech.UUCP> <9473@hubcap.clemson.edu> <16980@haddock.ima.isc.com> Organization: Memorex Telex Corporation NSBG/STP Lines: 20 peter@ficc.ferranti.com (Peter da Silva) writes: >In article <16980@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >> An ANSI-to-Classic conversion tool could do the job, but >> I haven't heard of one that inserts the necessary casts. >And it still wouldn't take care of > execl("/bin/foo", "foo", "bar", (char *)NULL); Devil's advocate: why not? All it has to know is that all arguments to execl must be of type char *. By adding some more elaborate smarts to the converter, this could be extended to many other (but, granted, not literally ALL) varargs functions. And in the cases of the functions the converter could not handle, it could warn the user to fix them up manually. -- Daniel R. Levy Memorex Telex Corporation Naperville IL ..!uunet!tellab5!mtcchi!levy