Re:Null Pointer Dereferencing Causes Undefined Behavior
by numeromancer on Tuesday April 21, 2015 @08:53AM
(#9413659)
> As he showed, a null pointer cannot point to any object
From my reading, he didn't even show that:
>> If a null pointer constant is converted to a pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal to a pointer to any object or function.
So a null pointer could point to an object, it just wouldn't compare equal to any pointer, even itself.
From my reading, he didn't even show that:
>> If a null pointer constant is converted to a pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal to a pointer to any object or function.
So a null pointer could point to an object, it just wouldn't compare equal to any pointer, even itself.