<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Real warning produced by definition of _cvtss_sh in C++"
href="https://bugs.llvm.org/show_bug.cgi?id=32491">32491</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Real warning produced by definition of _cvtss_sh in C++
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>thiago@kde.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>With the following code in C++:
b16 = _cvtss_sh(f, 0);
The compiler produces:
/qfloat16.h:119:11: error: compound literals are a C99-specific feature
[-Werror,-Wc99-extensions]
b16 = _cvtss_sh(f, 0);
^
/opt/clang/lib64/clang/5.0.0/include/f16cintrin.h:76:55: note: expanded from
macro '_cvtss_sh'
((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
^
This warning is caused by the macro definition in f16cintrin.h as supplied by
Clang.
Please either suppress the warning when it's produced by a macro created in a
Clang-supplied file or fix the file not to produce a warning in C++ mode.
Reproduced with Clang 3.9.1 and 5.0 (trunk)</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>