Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!hubcap!gatech!mcnc!uvaarpa!murdoch!hopper!rja7m From: rja7m@hopper.cs.Virginia.EDU (Ran Atkinson) Newsgroups: comp.lang.c Subject: Re: the nil pointer is not zero Summary: it never was guaranteed Message-ID: <1990Nov14.192054.20551@murdoch.acc.Virginia.EDU> Date: 14 Nov 90 19:20:54 GMT References: <7131@castle.ed.ac.uk> <27636@mimsy.umd.edu> <14459@smoke.brl.mil> Sender: news@murdoch.acc.Virginia.EDU Reply-To: Ran Atkinson Followup-To: comp.lang.c Organization: University of Virginia Lines: 16 In article <27636@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: > On computers on which address location zero has `interesting' contents ... In article <14459@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: % One implementation possibility is to use the address of some reserved % object in the run-time library for the null pointer. Indeed, a compiler used on a former project had the NULL pointer address be 0xf0000000 because that happened to point into a place where the system would generate an runtime access violation if a NULL pointer were dereferenced. It invariably confused folks who hadn't thought clearly and went to debug their code, so as a style convention we required folks to always write "NULL" rather than some other equivalent in their C code to reinforce the notion that the null pointer isn't necessarily address 0x00000000.