<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:matz@suse.de" title="Michael Matz <matz@suse.de>"> <span class="fn">Michael Matz</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - false(?) -Wsequence warning"
   href="https://bugs.llvm.org/show_bug.cgi?id=33065">bug 33065</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>matz@suse.de
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - false(?) -Wsequence warning"
   href="https://bugs.llvm.org/show_bug.cgi?id=33065#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - false(?) -Wsequence warning"
   href="https://bugs.llvm.org/show_bug.cgi?id=33065">bug 33065</a>
              from <span class="vcard"><a class="email" href="mailto:matz@suse.de" title="Michael Matz <matz@suse.de>"> <span class="fn">Michael Matz</span></a>
</span></b>
        <pre>(In reply to James Y Knight from <a href="show_bug.cgi?id=33065#c5">comment #5</a>)
<span class="quote">> The standard says (C11 section 6.7.9 para 23):

> > The evaluations of the initialization list expressions are indeterminately sequenced with respect to one another and thus the order in which any side effects occur is unspecified.152)

> > 152) In particular, the evaluation order need not be the same as the order of subobject initialization


> This is independent of the "6.7.8 par 19" quoted (which is now 6.7.9 para 19)</span >

While I agree this could be read that way (though I find that overly aggressive
reading), the rest is wrong.  First:

<span class="quote">> Further, there is not a sequence point between these, as an initializer in a
> compound literal is not a "full expression".</span >

This is no compound literal, it's an initializer.

And second:

<span class="quote">> "Full expression" does actually
> (perhaps surprisingly) seem to mean what it sounds like it should.</span >
>
<span class="quote">> From C11 6.8 para 4: 
> > A full expression is an expression that is not part of another expression or of a declarator.</span >

While the citation is of course correct, it doesn't apply here.  The
initializer
is not part of a declarator (it is part of a declaration; expressions in
declarators are things like array sizes). Hence the expressions in the
initializer-list are full expressions (as they clearly aren't part of other
expressions either), and so the sequence point rule
between full expressions applies and clangs warning is wrong.

Reopening because of this.</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>