&gt; On systems where 0 is a valid memory address the compiler should pick some other address that is not valid.<p>Not necessarily. Null dereference is undefined behavior so it may as well access some valid memory.<p>Even on platforms where 0 is a valid address, practical compilers tend to use 0 as null constant because it simplifies implementation (easy to check for null, matches the C syntax without WTFs).<p>This comes at the cost of making some small part of memory unusable to portable C code (nobody will believe you when you return 0 from malloc if 0 happens to be considered null), but that&#x27;s fine because such memory is typically used for machine-specific, nonportable stuff anyway.