title: error: cast from 'void*' to 'int' loses precision
body: <p>I have a function with prototype <code>void* myFcn(void* arg)</code> which is used as the starting point for a pthread.  I need to convert the argument to an int for later use:</p>
  
  <pre><code>int x = (int)arg;
  </code></pre>
  
  <p>The compiler (GCC version 4.2.4) returns the error:</p>
  
  <pre><code>file.cpp:233: error: cast from 'void*' to 'int' loses precision
  </code></pre>
  
  <p>What is the proper way to cast this?</p>