title: 64-bit subtraction result to 32-bit integer
body: <p>There is an existing function named "Compare," which is</p>
  
  <pre><code>int compare(void* A, void* B) { return (int)A - (int)B; }
  </code></pre>
  
  <p>I am aware that this is an atrocious practice, but I did not write that piece of code and it is being used in many places already. But this code was generating a compilation error under 64-bit, since void* is no longer 32-bit, so I fixed the code to the following. </p>
  
  <pre><code>int compare(void* A, void* B) { return (long long)A - (long long)B; }
  </code></pre>
  
  <p>What is the likelihood of this function returning an incorrect result under current 64-bit Linux architecture? i.e, what is the likelihood of two virtual addresses being apart for more than 0x7FFFFFFF?</p>