<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Unsequenced warnings displayed inconsistently"
   href="https://bugs.llvm.org/show_bug.cgi?id=37999">bug 37999</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;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Unsequenced warnings displayed inconsistently"
   href="https://bugs.llvm.org/show_bug.cgi?id=37999#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Unsequenced warnings displayed inconsistently"
   href="https://bugs.llvm.org/show_bug.cgi?id=37999">bug 37999</a>
              from <span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span></b>
        <pre>Yep - looks like 'tolower' is implemented as a macro at -O1 and as a function
at -O0:

O0:
 g[i] = tolower(g[i++]);
O1:
 g[i] = (__extension__ ({ int __res; if (sizeof (g[i++]) > 1) { if
(__builtin_constant_p (g[i++])) { int __c = (g[i++]); __res = __c < -128 || __c
<span class="quote">> 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower (g[i++]);</span >
} else __res = (*__ctype_tolower_loc ())[(int) (g[i++])]; __res; }));

So the O1 implementation doesn't have an unsequenced operation, but the O0
implementation does.

(adding Richard Smith, just in case my understanding here is wrong - I guess
maybe the statement expression might be unsequenced relative to the other parts
of the statement outside the statement expression (though the standard doesn't
talk about that, because statement expressions are non-standard))</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>