title: Does modulus overflow?
body: <p>I know that (INT_MIN / -1) overflows, but (INT_MIN % -1) does not. At least this is what happens in two compilers, one pre-c++11 (VC++ 2010) and the other post-c++11 GCC 4.8.1</p>
  
  <pre><code>int x = INT_MIN;
  cout &lt;&lt; x / -1 &lt;&lt; endl; 
  cout &lt;&lt; x % -1 &lt;&lt; endl;
  </code></pre>
  
  <p>Gives:</p>
  
  <pre><code>-2147483648
  0
  </code></pre>
  
  <p>Is this behavior standard defined or this is implementation defined? 
  Also is there ANY OTHER case where the division operation would overflow?
  and is there any case where the modulus operator would overflow?</p>