title: Clang warns me when I aggregate initialize an array while gcc doesn't
body: <p>When I compile the following piece of code with CLANG:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;array&gt;
  #include &lt;algorithm&gt;
  #include &lt;functional&gt;
  
  int main() {
    std::array&lt;int, 2&gt; a = {1, 2};
    std::array&lt;int, 2&gt; b = {2, 1};
    std::array&lt;int, 2&gt; c;
    std::transform(a.begin(), a.end(), b.begin(), c.begin(), std::multiplies&lt;int&gt;());
    for(auto &amp;&amp;i : c) std::cout &lt;&lt; i &lt;&lt; " ";
    std::cout &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>by issuing the command:</p>
  
  <blockquote>
    <p><em>clang++ -std=c++14 -O2 -Wall -pedantic -pthread main.cpp</em></p>
  </blockquote>
  
  <p>It issues the warning:</p>
  
  <blockquote>
    <p><em>warning: suggest braces around initialization of subobject
    [-Wmissing-braces]</em></p>
  </blockquote>
  
  <p><a href="http://coliru.stacked-crooked.com/a/8928e269043d5f50" rel="nofollow"><strong>CLANG DEMO</strong></a></p>
  
  <p>However, GCC compiles this program with out issuing a warning at all.</p>
  
  <p><a href="http://coliru.stacked-crooked.com/a/9fba77c24cd2eed0" rel="nofollow"><strong>GCC DEMO</strong></a></p>
  
  <h2>Q:</h2>
  
  <ol>
  <li>Which compiler is right?</li>
  <li>What's the reason that Clangs warns me?</li>
  </ol>