Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!uunet!zephyr.ens.tek.com!tektronix!reed!intelhf!ichips!inews!pima!bhoughto From: bhoughto@pima.intel.com (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: Is there a NULL pointer to functions? Message-ID: <4429@inews.intel.com> Date: 27 May 91 20:51:04 GMT References: <4416@inews.intel.com> <748@taumet.com> <4428@inews.intel.com> Sender: news@inews.intel.com Distribution: na Organization: Intel Corp, Chandler, AZ Lines: 29 In article <4428@inews.intel.com> bhoughto@pima.intel.com (Blair P. Houghton) writes: >"...NULL, which expands to an implementation-defined null >pointer constant..." >(ANSI X3.159-1989, sec. 4.1.5, p. 99, ll. 21-22) > >"Such a pointer, called a null pointer constant, is guaranteed to >compare unequal to a pointer to any object OR FUNCTION." [emphasis >mine --Blair] >(Ibid, sec. 3.2.2.3, p. 38, ll. 3-4) Oops. Total disconnect of the neural fabric. The word "constant" should be removed from the 3.2.2.3 quotation. The entire paragraph goes: "An integral constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant. If a null pointer constant is assigned to or compared for equality to a pointer, the constant is converted to a pointer of that type. Such a pointer, called a null pointer, is guaranteed to compare unequal to a pointer to any object or function." (Ibid., ll. 1-4) This doesn't abrogate the necessity that comparisons involve compatible types, however, nor that bare constants take the type of the object to which they are assigned or compared. --Blair "I get me some new specs, someday... @^O"