<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mcatanzaro@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <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>
</td>
<td>benjamin@webkit.org, mcatanzaro@igalia.com, zan@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@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <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">> Another option is to use &&:
>
> !((ua ^ ub) >> 31) && (uresult ^ ua) >> 31;</span >
Didn't squint hard enough; that needs more parentheses. The choices are:
(!((ua ^ ub) >> 31)) & (uresult ^ ua) >> 31;
or
!((ua ^ ub) >> 31) && ((uresult ^ ua) >> 31);
I think I prefer the later.
For subtraction, we currently have this:
(ua ^ ub) >> 31 & (uresult ^ ua) >> 31
If we use && for addition, we'd want to use && there as well, so it would become:
((ua ^ ub) >> 31) && ((uresult ^ ua) >> 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>