title: Does the C++ standard specify that for some cases the compiling should fail with an error?
body: <p>I'm checking the standard about narrowing conversion, and I think for a narrowing conversion an error should be triggered. Because the <a href="http://eel.is/c++draft/dcl.init.list#7" rel="nofollow noreferrer">standard</a> says:</p>
  
  <blockquote>
    <p>[ Note: As indicated above, such conversions are not allowed at the top level in list-initializations. — end note ] </p>
  </blockquote>
  
  <p>I think the description of "not allowed" means the compiling should fail.</p>
  
  <p>But someone told me that <a href="http://eel.is/c++draft/dcl.init.list#3.7" rel="nofollow noreferrer">here</a> just says "the program is ill-formed", and the standard won't require that compilation must fail.</p>
  
  <blockquote>
    <p>if a narrowing conversion (see below) is required to convert the
    element to T, the program is ill-formed.</p>
  </blockquote>
  
  <p>So my question is: Does the standard specify whether an error or warning should be generated? Or for some cases the compiling should fail? From the aspect of a compiler, is it OK to make the program compile and just give some warnings?</p>
  
  <p>BTW: <a href="http://melpon.org/wandbox/permlink/vWMLCfOZAHOHjkju" rel="nofollow noreferrer">Clang 4.0.0</a> and <a href="http://melpon.org/wandbox/permlink/M3BGNWmcfJ99SuoU" rel="nofollow noreferrer">Gcc 7.0.0</a> behave differently.</p>
  
  <pre><code>float a {1.e39}; // Error for both Clang and GCC
  double d;
  float a3{d};     // Error for Clang, warning for GCC
  </code></pre>