Data type assignment differences under ILP32 and LP64

Under ILP32, int, long and pointer types have the same size and can be freely assigned to one another.

Under LP64, all pointer types are 8 bytes in size. Assigning pointers to int types and back again can result in a invalid address, and passing pointers to a function that expects an int type will result in truncation. For example, the following statement show an incorrect assignment.
int i;
int *p;
i = (int)p;
Note: The problem is harder to detect when casts are used. Although there is no warning message, the problem still exists.
Avoid making any of the following assumptions: