title: g++ strict overflow, optimization, and warnings
body: <p>When compiling the following with the strict overflow flag, it tells me, on the 2nd test that r may not be what I think it could be:</p>
  
  <pre><code>    int32_t r(my_rand());
      if(r &lt; 0) {
          r = -r;
          if(r &lt; 0) {   // &lt;-- error on this line
              r = 0;
          }
      }
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>/build/buildd/libqtcassandra-0.5.5/tests/cassandra_value.cpp:
       In function 'int main(int, char**)':
  /build/buildd/libqtcassandra-0.5.5/tests/cassandra_value.cpp:2341:13:
       error: assuming signed overflow does not occur when simplifying
       conditional to constant [-Werror=strict-overflow]
           if(r &lt; 0) {
           ^
  </code></pre>
  
  <p>What I do not understand is: why wouldn't the error be generated on the line before that? Because really the overflow happens when I do this, right?</p>
  
  <pre><code>    r = -r;
  </code></pre>