<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Warning about braces on the normative statement of how to initialize a std::array."
   href="https://llvm.org/bugs/show_bug.cgi?id=30767">30767</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Warning about braces on the normative statement of how to initialize a std::array.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++11
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bmoses@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In the C++11 standard, [array.overview] paragraph 2 basically gives the
following as a normative statement of how to initialize a std::array.

  #include <array>
  void f(const int& x) {
    std::array<int, 3> y = {x, x, x};
  }

However, Clang warns on this, with "suggest braces around initialization of
subobject".  See, e.g., <a href="https://godbolt.org/g/lZ3tn3">https://godbolt.org/g/lZ3tn3</a>.

It seems a bit weird to get a warning on things that the standard considers
normative!</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>