Any pointer arithmetic should be performed using variables of type long regardless if in 32-bit or 64-bit mode.
You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time. (Bertrand Meyer).