Is there a NULL pointer to functions?
Blair P. Houghton
bhoughto at pima.intel.com
Tue May 28 06:51:04 AEST 1991
In article <4428 at inews.intel.com> bhoughto at 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"
More information about the Comp.lang.c
mailing list