Unfortunately, you chose a bad example, but feel free to try others.
Im enjoying this discussion.
This example is bad because the IF is a purely numerical comparison.
So in this case null is replaced (by the compiler define) as a literal zero.
This zero is then type-cast by the compiler to type 'int' cause its an integer and a literal.
This now (int)0 is compared (==) against some_object.
To do this, some_object is now recast to a type 'int' as well.
So if it was a pointer, it now has a re-cast value equivalant to (int)(addressof)some_object.
So if some_object was = ((void*)0x00000000), it now has a value of (int)0.
So therefore,
If some_object was a valid pointer, the IF returns false, as expected.
If some_object was a NULL pointer, the IF returns true, as expected.
or, if you already knew that some_object was a variable rather than a pointer
If some_object was a variable equal to zero, the IF returns true, as expected.
If some_object was a variable not equal to zero, the IF returns false, as expected.
See why it was a bad choice of example.
However, from my experiences in operating system development, a 0 would often not be sufficient and had to be replaced ((void*)0x00000000) to work correctly (using GCC).
I suspect that a compiler capabable of generating an operating system is very likely
to be much more low-level and stringent than a (relitivly) simple game-engine.