Q: Seriously, if real machines really used non-zero null pointers or different views for pointers to different types?
A: Segment 07777 of the Prime 50 series, offset 0 for null pointer, at least for PL / I. Later models used segment 0, offset 0 for null pointers to C, which requires new instructions such as TCNP (Test C Null Pointer), obviously like sop for [footnote] all existing poorly written C code, which made incorrect assumptions . Elder, printing machines were also known that required larger byte pointers ( char * ) than pointers to words ( int * 's).
The Eclipse MV series from Data General has three architecturally supported pointer formats (words, bytes, and bit pointers), two of which are used by C compilers: byte pointers for char * and void * , and word pointers for everything else. For historical reasons, during the evolution of the 32-bit MV line from the 16-bit Nova line, the word pointers and byte pointers had an offset, indirection and ring of protection bits in different places of the word. Passing mismatches pointer format to function led to security errors. In the end, the MV C compiler added many compatibility options to try to handle code with pointer type mismatch errors.
Some Honeywell-Bull mainframes use the 06000 bit chart for (internal) null pointers.
The CDC Cyber โโ180 series has 48-bit pointers consisting of a ring, segment, and offset. Most users (in ring 11) have null pointers 0xB00000000000. It was common for older CDC devices to use a single-bit word as a special flag for all kinds of data, including invalid addresses.
The old HP 3000 series uses a different addressing scheme for the address byte than for word addresses; as several machines are higher so it uses different representations for char * and void * than for other pointers.
Lisp Symbols A machine-tagged architecture does not even have ordinary numeric pointers; it uses a pair of <NIL, 0> (basically a nonexistent <object, offset> descriptor) as a null pointer C.
Depending on the memory model used, 8086-family processors (PC compatible devices) can use 16-bit data pointers and a 32-bit pointer function, or vice versa.
Some 64-bit Cray machines represent int * in the lower 48 bit word; char * additionally uses some of the upper 16 bits to indicate the byte address inside the word.
Given that these null pointers have a strange representation of the bit pattern in the quoted machines, the code you put: