Portably cast a pointer to an integer.