title: Why doesn't clang warn about implicit conversion from double to int, but do it when from long to int?
body: <p>In the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main()
  {
    const long l = 4294967296;
    int i = l;
    return i; //just to silence the compiler
  }
  </code></pre>
  
  <p>the compiler warns about implicit conversion (using -Wall and -std=c++14) as following:</p>
  
  <pre><code>warning: implicit conversion from 'const long' to 'int' changes value from 4294967296 to 0 [-Wconstant-conversion]
  </code></pre>
  
  <p>which is ok. But there is no warning if the conversion is from double to int, as in the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main()
  {
    const double d = 4294967296.0;
    int i = d;
    return i; //just to silence the compiler
  }
  </code></pre>
  
  <p>Why the compiler reacts differently in these situations?</p>
  
  <p>Note 1: clang version is 3.6.2-svn240577-1~exp1</p>
  
  <p>Note 2: I've tested it with many others versions of gcc, clang and icc thanks to Compiler Explorer (gcc.godbolt.org). So all tested versions of gcc (with exception of 5.x) and icc threw the warning. No clang version did it.</p>