...
Do not convert a pointer type to an integer type if the result cannot be represented in the integer type. (See undefined behavior 2423.)
The mapping between pointers and integers must be consistent with the addressing structure of the execution environment. Issues may arise, for example, on architectures that have a segmented memory model.
...