Uninitialized externals and statics.

Gary Bridgewater gary at dgcad.SV.DG.COM
Sun Aug 27 18:45:39 AEST 1989


In article <131 at crdos1.crd.ge.COM> davidsen at crdos1.crd.ge.COM (Wm E Davidsen Jr) writes:
>In article <783 at skye.ed.ac.uk>, richard at 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 at sv4.ceo.sv.dg.com or 
{amdahl,aeras,amdcad,mas1,matra3}!dgcad.SV.DG.COM!gary
No good deed goes unpunished.



More information about the Comp.lang.c mailing list