title: Signed/unsigned mismatch when comparing two unsigned values using a conditional operator
body: <p>I have the following C code:</p>
  
  <pre><code>unsigned int a;
  unsigned char b, c;
  void test(void) {
      if (a &lt; b)
          return;
      if (a &lt; (b ? b : c))
          return;
  }
  </code></pre>
  
  <p>When I compile it (with Microsoft <code>cl</code>, from MS SDK 7, <code>-W3</code> warning level), the second comparison emits a warning: C4018, signed/unsigned mismatch. The first comparison emits no warning.</p>
  
  <p>I've checked <a href="http://msdn.microsoft.com/en-us/library/e4213hs1%28v=vs.90%29.aspx" rel="nofollow">MS docs on the conditional operator</a> and they says that if both operands are of same type, the result will be of the same type, so it should work as the first comparison. Am I missing something?</p>
  
  <p><strong>UPD:</strong> tested with <code>gcc -Wall -Wextra -pedantic</code> and got no warnings whatsoever.</p>