Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.lang.c Subject: Re: Explicit cast of NULL (was Re: Short-circuiting conditions) Message-ID: <819@mwtech.UUCP> Date: 27 Jun 90 23:03:26 GMT References: <4556@thebes.Thalatta.COM> <111287@linus.mitre.org> <8860@crdgw1.crd.ge.com> <807@mwtech.UUCP> <9473@hubcap.clemson.edu> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 29 In article <9473@hubcap.clemson.edu> grimlok@hubcap.clemson.edu (Mike Percy) writes: >martin@mwtech.UUCP (Martin Weitzel) writes: [about explicit casts of NULL-pointers] >>IMHO, if ANSI-C together with compilers that implement it *and* >>function prototypes will be in broad use (1..3 years from now, I >>suppose), explicit casts for NULL-pointers should become obsolete. > >As near as I can tell, the need for explicit casts on NULL pointers _IS_ >obsolete. Read careful what I wrote! You assume a compiler which implements prototypes. Many people have to support code that must be compiled with different compilers. Even if four out of five *have* prototypes, you must explicitly cast NULL-pointer function arguments for the the one that doesn't have them! >Don't continue to propogate obsolete-isms. Use prototyping >utilities to fix old programs. I've been using prototypes ever since my >compiler (TurboC) supported them. The sooner everyone starts using >them, the sooner we can forget about the obsolete crap. My point was not that prototypes should not be used, but simply that at this time many compilers don't support them. It's true that Turbo-C has prototypes for years now, but that doesn't help if I have to compile on 386/ix, SINIX (don't worry if you don't know that :-)), XENIX-286, ... -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83