title: Inconsistent behaviour of implicit conversion between unsigned and bigger signed types
body: <p>Consider following example:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void)
  {
      unsigned char a  = 15; /* one byte */
      unsigned short b = 15; /* two bytes */
      unsigned int c   = 15; /* four bytes */
  
      long x = -a; /* eight bytes */
      printf("%ld\n", x);
  
      x = -b;
      printf("%ld\n", x);
  
      x = -c;
      printf("%ld\n", x);
  
      return 0;
  }
  </code></pre>
  
  <p>To compile I  am using GCC 4.4.7 (and it gave me no warnings):</p>
  
  <pre><code>gcc -g -std=c99 -pedantic-errors -Wall -W check.c
  </code></pre>
  
  <p>My result is:</p>
  
  <pre><code>-15
  -15
  4294967281
  </code></pre>
  
  <p>The question is why both <code>unsigned char</code> and <code>unsigned short</code> values are "propagated" correctly to (signed) <code>long</code>, while <code>unsigned int</code> is not ? Is there any reference or rule on this ?</p>
  
  <p>Here are results from <code>gdb</code> (words are in little-endian order) accordingly:</p>
  
  <pre><code>(gdb) x/2w &amp;x
  0x7fffffffe168: 11111111111111111111111111110001    11111111111111111111111111111111 
  
  (gdb) x/2w &amp;x
  0x7fffffffe168: 11111111111111111111111111110001    00000000000000000000000000000000
  </code></pre>