title: SIGFPE with gcc and unsigned integers
body: <p>I'm getting this weird behaviour from an executable compiled with different versions of <code>gcc</code>, all emit the <code>SIGFPE</code> signal and the best part is that I have no floating point of any kind in my code; if someone could shed some light on this ... I literally don't know where to start to debug this, it's so weird and this bug is triggered by all the gcc installations that I have from <code>4.9</code> to <code>6.0</code>.</p>
  
  <p>Here is a snippet that reproduces the problem</p>
  
  <pre><code>// Floating point exception - SIGFPE
  #include &lt;stdio.h&gt;
  typedef unsigned int T;
  int main()
  {
  #define N 256 
    for (T i = 0; i &lt; N; ++i)
      {
        i += (i % i);
        printf("%u\t", i);
      }
  }
  // bug uncovered with
  // gcc version 4.9.2 (Debian 4.9.2-10)
  // gcc version 5.1.0 (GCC)
  // gcc version 6.0.0 20150517 (experimental) (GCC)
  // using -std=c11 or -std=c99
  </code></pre>
  
  <p>The purpose of this code is to reproduce the problem, I know that the logic of it doesn't really make too much sense ( the modulo part ) but <code>clang</code> passes the test, no version of <code>gcc</code> does the same and I would like to know why if there is a technical explanation for this kind of behaviour .</p>