Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Abandon NULL for (0)
Message-ID: <1989Oct6.164238.5778@utzoo.uucp>
Organization: U of Toronto Zoology
References: <15571@nswitgould.cs.uts.oz>
Date: Fri, 6 Oct 89 16:42:38 GMT

In article <15571@nswitgould.cs.uts.oz> karl_auer_%7801.801@fidogate.fido.oz (1) writes:
>There is another good reason not to use '(0)' - in some
>implementations of C, pointers can have different sizes, requiring
>that NULL be sometimes defined as (0), sometimes as (0L)...

Such implementations are broken.  In standard C it is *always* legal to
use `0' (the parentheses are unnecessary) anywhere where you could use
NULL.  Of course, it is also necessary to cast those NULLs to the correct
type when passing them as arguments to functions.  (The 0L nonsense is an
attempt, only partially successful, to cater to amateur programmers who
don't bother with this.)
-- 
Nature is blind; Man is merely |     Henry Spencer at U of Toronto Zoology
shortsighted (and improving).  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
