Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!apple!sun-barr!oliveb!amdahl!dgcad!gary From: gary@dgcad.SV.DG.COM (Gary Bridgewater) Newsgroups: comp.lang.c Subject: Re: Uninitialized externals and statics. Message-ID: <1073@svx.SV.DG.COM> Date: 27 Aug 89 08:45:39 GMT References: <2128@infmx.UUCP> <10764@smoke.BRL.MIL> <478.nlhp3@oracle.nl> <783@skye.ed.ac.uk> <131@crdos1.crd.ge.COM> Reply-To: gary@svx.SV.DG.COM () Organization: Data General SDD, Sunnyvale, CA Lines: 18 In article <131@crdos1.crd.ge.COM> davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: >In article <783@skye.ed.ac.uk>, richard@aiai.ed.ac.uk (Richard Tobin) writes: >... I believe that some DG models have char ptrs which are non-zero when NULL, >but I haven't looked at one in close to ten years. DG's 32 addresses come in two flavors: a 2-byte word address with left most bit indicating indirection, next three bits indicating ring address (MULTICs like rings) and the final 28 bits of word address. User rings are 4-7 so the address of the 'first' word in the lowest user ring is 0x40000000. Byte pointers are word pointers shifted left (no indirect byte pointers). So the byte address of the first byte in the user's rings is 0x8000000. Our C compiler is quite happy to allow NULL=0 to make commmon Cisms work fine but if you violate the rules and expect to dereference a NULL pointer you will get a ring validity trap. Crock? Bug? Feature? So far only people with belly buttons have had an opinion on this. :-) -- Gary Bridgewater, Data General Corp., Sunnyvale Ca. gary@sv4.ceo.sv.dg.com or {amdahl,aeras,amdcad,mas1,matra3}!dgcad.SV.DG.COM!gary No good deed goes unpunished.