Taking the difference between pointers that do not point inside the same object is Undefined Behaviour.
Your pointers do not point to any object at all.
It is Undefined Behaviour to subtract the pointers in your code.
Any result (10, 40, 65535, -1) is erroneous.