gcc and NULL function pointers.

Blair P. Houghton bhoughto at pima.intel.com
Fri Jun 28 12:39:31 AEST 1991


In article <1991Jun27.190107.627 at cirrus.com> dhesi at cirrus.com (Rahul Dhesi) writes:
>And the bottom line:
>
>     All definitions of NULL other than 0 are wrong, no matter how
>     much or how little ANSI-conformant they may be.

Well, no, they aren't "wrong", they're just redundant, because
it is true in all cases that the only "right" way to _use_ NULL
is to cast it to a type compatible with the object, pointer, or
function parameter being set to or compared against NULL, and then
not to use it for anything but pointer types (which are explicitly
defined to be tolerant of wacky chains of casts of their null value).

				--Blair
				  "But this will have changed by the
				   next time I see this posting, so
				   I'm going to go take another nap..."



More information about the Comp.std.c mailing list