converting device pointer to int on x86_64 is the result guaranteed to be correct?

It seems that the pointer to device memory on x86_64 system is 64bit. But I want to use 32bit to store it, so I converted the pointer to an int. The code seem to work find for now. Is the result of this conversion guaranteed to be correct?

Device pointers are all existing CUDA-capable devices are currently 32-bits. That is why it currently works. But there is nothing in the CUDA spec indicating this requirement. So you will some day be faced with a device that uses 64-bit pointers, and your code will not work. Why not just use pointer types to store them?