title: Is there a GCC warning that detects bit shift operations on signed types?
body: <p>If I read the C++ ISO specification (sections 5.8.2 and 5.8.3) right, the right-shift of negative signed types is implementation specific and the left-shift undefined behaviour.</p>
  
  <p>Therefore I would like to find shift operations on signed types in our legacy source code which we compile with g++ 4.8.2.</p>
  
  <p>Unfortunately, I couldn't find such an option in the <a href="https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Warning-Options.html">manual</a>.
  I can for example compile this code with "g++ -Wall -Wextra -pedantic" without a warning:</p>
  
  <pre><code>int si    = -1;
  int left  = si &lt;&lt; 1; // -2 (multiplication by 2, sign is preserved)
  int right = si &gt;&gt; 1; // -1 (no change, only 1s)
  </code></pre>
  
  <p>Can anyone tell me if there is such a warning and, if not, why gcc doesn't care about it?</p>