<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/107213/">http://git.reviewboard.kde.org/r/107213/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 10th, 2012, 10:21 p.m., <b>Rolf Eike Beer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">A simple way to verify if this is correct is check if you and the compiler agree on the code. Run "make -n" in the build tree to get the full compiler command line, then insert a "-S" (assuming you are using gcc) and change the -o to point to a temporary file. This will output the assembler code. Do this with and without your modifications and look if the result is still the same.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">yes, I've done it. They match.
bool kk1()
{
int a = 1;
int b = 2;
return (!a ^ b);
}
bool kk2()
{
int a = 1;
int b = 2;
return (!(a ^ b));
}
bool kk3()
{
int a = 1;
int b = 2;
return (!(a) ^ b);
}
kk1 and kk3 produce the same assembler output.
But the problem is if the author really wanted the parenthesis that way or not.
for example, (!a) ^ b (what gcc produces) vs. !(a ^ b) (what the author wanted?)
</pre>
<br />
<p>- Jaime Torres</p>
<br />
<p>On November 5th, 2012, 3:13 p.m., Jaime Torres Amate wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kdelibs.</div>
<div>By Jaime Torres Amate.</div>
<p style="color: grey;"><i>Updated Nov. 5, 2012, 3:13 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">place some parenthesis around ! operators, with less priority than ^ operators.
place some parenthesis around = inside conditions
check for n not being null before using it
simplify if (a==true) return true else return false;
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I've been using this code several weeks.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>khtml/khtml_caret.cpp <span style="color: grey">(45fd90c)</span></li>
<li>khtml/rendering/render_inline.cpp <span style="color: grey">(acfc1e4)</span></li>
<li>khtml/rendering/render_object.cpp <span style="color: grey">(f37627c)</span></li>
<li>solid/solid/backends/wmi/wmiopticaldisc.cpp <span style="color: grey">(c6e390f)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107213/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>