title: Conversion from long to short error
body: <p>I have the following code:</p>
  
  <pre><code>int main()
  {
     short s(0);
     long l(10);
  
     s += static_cast&lt;short&gt;(l);
  }
  </code></pre>
  
  <p>I'm compiling this with g++ and I get the following error:</p>
  
  <pre><code>..\src\main.cpp:6:7: warning: conversion to 'short int' from 'int' may alter its value [-Wconversion]
  </code></pre>
  
  <p>I absolutely have no idea why this is happening, as I thought that "static_cast" permitted to avoid this king of warnings.</p>
  
  <p>Thanks for any help provided.</p>