<html>
<head>
<base href="http://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 --- - clang -pedantic -Werror complains about C11 Generics in math.h"
href="http://llvm.org/bugs/show_bug.cgi?id=17788">17788</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang -pedantic -Werror complains about C11 Generics in math.h
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rakuco@FreeBSD.org
</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>From <<a href="http://article.gmane.org/gmane.os.freebsd.current.scm/5259">http://article.gmane.org/gmane.os.freebsd.current.scm/5259</a>>: David says
clang should not emit any warnings about Generics being used because math.h is
a system header, and the following snippet should build just fine with `clang
-pedantic -Werror isnan.c`:
#include <math.h>
int main() { return isnan(42.); }
At the moment, the build fails on FreeBSD 11-CURRENT with:
isnan.c:2:21: warning: generic selections are a C11-specific feature
[-Wc11-extensions]
int main() { return isnan(42.); }
^
/usr/include/math.h:118:2: note: expanded from macro 'isnan'
__fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl)
^
/usr/include/math.h:86:39: note: expanded from macro '__fp_type_select'
#define __fp_type_select(x, f, d, ld) _Generic((x), \
^
1 warning generated.</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>