<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - glibc 2.20 WIFCONTINUED raises a -Wparentheses-equality warning"
href="https://llvm.org/bugs/show_bug.cgi?id=22949">22949</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>glibc 2.20 WIFCONTINUED raises a -Wparentheses-equality warning
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lkundrak@v3.sk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>It complains about extra parentheses around comparison, however no such thing
exists in the source -- the warning concerns the expanded macros:
[lkundrak@belphegor NetworkManager]$ clang -Werror -Wparentheses-equality
-Wno-unused -c feh.c
feh.c:2:99: error: equality comparison with extraneous parentheses
[-Werror,-Wparentheses-equality]
void f () { if ((((__extension__ (((union { __typeof(0) __in; int __i; }) {
.__in = (0) }).__i))) == 0xffff)) return; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
feh.c:2:99: note: remove extraneous parentheses around the comparison to
silence this warning
void f () { if ((((__extension__ (((union { __typeof(0) __in; int __i; }) {
.__in = (0) }).__i))) == 0xffff)) return; }
~
^ ~
feh.c:2:99: note: use '=' to turn this equality comparison into an assignment
void f () { if ((((__extension__ (((union { __typeof(0) __in; int __i; }) {
.__in = (0) }).__i))) == 0xffff)) return; }
^~
=
1 error generated.
[lkundrak@belphegor NetworkManager]$ cat feh.c
#include <sys/wait.h>
void f () { if (WIFCONTINUED(0)) return; }
[lkundrak@belphegor NetworkManager]$</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>