title: Will bit-shift by zero bits work correctly?
body: <p>Say I have a function like this:</p>
  
  <pre><code>inline int shift( int what, int bitCount )
  {
      return what &gt;&gt; bitCount;
  }
  </code></pre>
  
  <p>It will be called from different sites each time <code>bitCount</code> will be non-negative and within the number of bits in <code>int</code>. I'm particularly concerned about call with <code>bitCount</code> equal to zero - will it work correctly then?</p>
  
  <p>Also is there a chance that a compiler seeing the whole code of the function when compiling its call site will reduce calls with <code>bitCount</code> equal to zero to a no-op?</p>