Xref: utzoo comp.lang.c++:6856 comp.std.c:2625 Newsgroups: comp.lang.c++,comp.std.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: references to dereferenced null pointers Message-ID: <1990Mar18.010327.13090@utzoo.uucp> Organization: U of Toronto Zoology References: <51083@microsoft.UUCP> <25EB8EE8.8462@paris.ics.uci.edu> <1990Mar12.175613.12082@utzoo.uucp> <1623@argus.UUCP> Date: Sun, 18 Mar 90 01:03:27 GMT In article shirono@ssd.csd.harris.com writes: > An integral constant expression with the value 0, or such an > expression cast to type void *, is called a _null pointer > constant_. (...) Note, also, that the cast to `void *' is legal not because it somehow creates a generic null pointer -- there is no such thing in C -- but because there may not be an integer type of the same size as a pointer, and breakage of old programs is minimized if NULL is the same size as a pointer. (Even on machines where pointers are not all the same size, one can at least reduce the breakage somewhat this way.) -- MSDOS, abbrev: Maybe SomeDay | Henry Spencer at U of Toronto Zoology an Operating System. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu