Make sure the size is unsigned and untruncated.
Make the address calculation use the same number of bits as the device they run on.