Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!gwyn@brl-vld From: gwyn%brl-vld@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: NULL vs 0 Message-ID: <16412@sri-arpa.UUCP> Date: Sat, 4-Feb-84 21:52:17 EST Article-I.D.: sri-arpa.16412 Posted: Sat Feb 4 21:52:17 1984 Date-Received: Thu, 9-Feb-84 02:48:52 EST Lines: 17 From: Doug Gwyn (VLD/VMB)In C, 0 is explicitly NOT ALLOWED to be a pointer to actual data. The C Standards Committee seems to be inclined to support declaration of procedure parameters, along with automatic coercion of arguments to the declared type. I am not happy with automatic coercion as I think it encourages sloppy coding, but at least it would let you blissfully supply 0 as a pointer argument and have the compiler turn it into the correct width of null pointer. However, this would not work for such functions as execl() where it is not possible to declare the type of all parameters, so you would still have to use (char *)0 as an execl() argument list terminator. I really don't see what all the discussion is about. Just use the appropriately typecast 0 where you need a null pointer in your C code and you have taken care of the matter for once and for all.