Does this mean that these languages ​​require that the special value in the address space be dead, which means that it is unusable, except for the role of the nullptr representation?
Not.
The compiler needs a special value to represent a null pointer and must take care that it does not place any object or function at this address, because all pointers to objects and functions must compare unequal with a null pointer. The standard library should take similar precautions when implementing malloc and friends.
However, if there is already something at this address, then to which no strictly appropriate program has access, then implementations are allowed to support dereferencing the null pointer to access it. Highlighting the null pointer is undefined in standard C, so an implementation can make it do whatever it likes, including the obvious.
Both C standards and C ++ understand the concept of the as-if rule, which basically means that if a valid input, the implementation is indistinguishable from one that conforms to the standard, then it conforms to the standard. Standard C uses a trivial example:
5.1.2.3 program execution
10 EXAMPLE 2 Execution of a fragment
char c1, c2; c1 = c1 + c2;
"whole stocks" require an abstract machine to raise the value of each variable to an int , and then add two ints and truncate the sum. If adding two char can be performed without overflow or without overflow, in order to get the correct result, the actual execution should produce only the same result, possibly omitting promotions.
Now, if the values c1 and c2 come from registers and allow you to force change values ​​outside the char range in these registers (for example, the built-in assembly), then the fact that the implementation optimizes an integer number of promotions can be noticeable. However, since the only way to observe this is through undefined behavior or implementation extensions, there is no way for any standard code to be affected by this, and the implementation can do this.
This is the same logic that is used to obtain useful results when dereferencing null pointers: there are only two ways to see from the code that there is something significant at this specific address: getting a null pointer from a guaranteed estimate, create a pointer to the object or just try it . The first is what the compiler mentioned, and the standard library should take care. The latter is not something that can affect a valid standard program.
A well-known example is the interrupt vector table for DOS implementations, which is located at the zero address. It is usually accessed simply by dereferencing a null pointer. C and C ++ standards do not support and cannot cover access to the table of interrupt vectors. They do not define this behavior, but they do not restrict its access. Implementations should be and be able to provide extensions to access them.