<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h"
   href="https://bugs.webkit.org/show_bug.cgi?id=143457">bug 143457</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;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>benjamin&#64;webkit.org, mcatanzaro&#64;igalia.com, zan&#64;falconsigh.net
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h"
   href="https://bugs.webkit.org/show_bug.cgi?id=143457#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h"
   href="https://bugs.webkit.org/show_bug.cgi?id=143457">bug 143457</a>
              from <span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=143457#c0">comment #0</a>)
<span class="quote">&gt; Another option is to use &amp;&amp;:
&gt; 
&gt; !((ua ^ ub) &gt;&gt; 31) &amp;&amp; (uresult ^ ua) &gt;&gt; 31;</span >

Didn't squint hard enough; that needs more parentheses. The choices are:

(!((ua ^ ub) &gt;&gt; 31)) &amp; (uresult ^ ua) &gt;&gt; 31;

or

!((ua ^ ub) &gt;&gt; 31) &amp;&amp; ((uresult ^ ua) &gt;&gt; 31);

I think I prefer the later.



For subtraction, we currently have this:

(ua ^ ub) &gt;&gt; 31 &amp; (uresult ^ ua) &gt;&gt; 31

If we use &amp;&amp; for addition, we'd want to use &amp;&amp; there as well, so it would become:

((ua ^ ub) &gt;&gt; 31) &amp;&amp; ((uresult ^ ua) &gt;&gt; 31)

That seems a bit clearer....</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>