Why NULL is 0

Louis A. Mamakos louie at trantor.umd.edu
Sat Mar 12 09:34:09 AEST 1988


In article <124 at polygen.UUCP> pablo at polygen.uucp (Pablo Halpern) writes:
>However, if I were writing a C compiler, I would choose a size for all
>pointers equal to the size of the largest possible pointer.  

Please don't do this.  On, for example, our Unisys 1100 machine, a "regular"
pointer is 8 bytes long (2 words, 72 bits).  A pointer to a function is 
64 bytes long (8 words, 288 bits).  Yes, this is a word-addressable machine
with 4 9-bit bytes per word. The existing semantics work just fine if
you don't assume programmer brain-damage.

Louis A. Mamakos  WA3YMH    Internet: louie at TRANTOR.UMD.EDU
University of Maryland, Computer Science Center - Systems Programming



More information about the Comp.lang.c mailing list