title: No warning on assignment of int to short (gcc)
body: <p>I often use assignment of "longer" typed variables to "shorter" ones, for example <code>int</code> to <code>short</code> or <code>uint32_t</code> to <code>uint8_t</code>. One day i decided to find all such cases in my code using gcc, but found to my amazement that gcc didn't output any warnings!</p>
  
  <pre><code>int long_value;
  short short_value;
  std::cin &gt;&gt; long_value; // Example input: 32769
  short_value = long_value; // MS Visual Studio complains here at warning level 4
  std::cout &lt;&lt; "Long: " &lt;&lt; long_value &lt;&lt; '\n'; // My example output: 32769
  std::cout &lt;&lt; "Short: " &lt;&lt; short_value &lt;&lt; '\n'; // My example output: -32767
  </code></pre>
  
  <p>Using <code>gcc -Wall</code> or <code>gcc -Wconversion</code> didn't help (gcc didn't output any warning). Actually, it never output any warning for any input and output type (e.g. <code>long</code> and <code>unsigned char</code>).</p>
  
  <p>I have never found an actual bug in gcc so i am almost sure this behavior has a reason.</p>
  
  <p>So why no warning?</p>
  
  <p>Update: i use gcc 4.1.2.</p>