Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ncar!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Referencing through a null pointer Message-ID: <11199@mimsy.UUCP> Date: 24 Apr 88 11:09:50 GMT References: <4729@cup.portal.com> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 16 In article <4729@cup.portal.com>, Paul_L_Schauble@cup.portal.com writes: >Could someone please tell me which machine it was that started the >unfortunate convention that referencing through the null pointer returns a >zero with no error? I was under the impression it was BSD Unix, but I'm not >sure. PDP-11s with split I&D had a shim at data address zero; I believe the shim was a zero. (The shim is necessary to keep the first data object from having an address that compares equal to NULL.) I imagine that PDP-11s without split I&D had *(char *)0 == 7 or 8, and *(short *)0 == 0407 or 0408 (OMAGIC and NMAGIC respectively). 32V Unix had *(int *)0==0. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris