<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60636>60636</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compound literal C99 warning
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tfabric76
</td>
</tr>
</table>
<pre>
When compiling eigen (clang 14) with AVX enabled, below warning (error) is encountered:
`
/mnt/c/git/content_analyzer/submodules/eigen/Eigen/src/Core/arch/Default/Half.h:415:9: error: compound literals are a C99-specific feature [-Werror,-Wc99-extensions]
h.x = _cvtss_sh(ff, 0);
`
due to this C99 compound literal:
` ^
/usr/lib/llvm-14/lib/clang/14.0.6/include/f16cintrin.h:69:55: note: expanded from macro '_cvtss_sh'
((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
`
It seems like this resolves the issue:
` ^
/usr/lib/llvm-14/lib/clang/14.0.6/include/f16cintrin.h:69:55: note: expanded from macro '_cvtss_sh'
((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph({a, 0, 0, 0}, \
`
or
`
#define _cvtss_sh(a, imm) \
(__v4sf q = {a, 0, 0, 0}; (unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph(q, \
(imm)))[0]))
`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzclM-uozYUxp_msDlKBHYgsGCRP4PaF-jtDhlzCG6NnbFN7p0-fWWHuZ25oy6q7kaKDET48H0_f-cI79XNELVQnqG8ZmINs3VtmMTglDxW2WDHL-3LTAalXe5KK3NDUjcyCKyWWpgbFgdgDb6qMOPpt9-RjBg0jcAuOJC2r_gqnInbgNXknHXxbeWRjLSrCeRoBH6C_Ar5Cap8u2HdYgKwTgLrbirdWRPIhF4Yob_8RQ5Y59dhseOqyQPrkipg3aft6l3ce7GOgHXCyRlYd6VJrDpW-0XoaT8DPx2KEvipAX7Cpzp-SlbtakbUKpAT2qNwhAIvTbPzd5JqUhInEmF1hFCedy-bscvuRTbNjt4CGa-s8VBen4YQ5_0bAr9iLx_B-97PwOppiphyYA3w8wcE40oYLIZZ-fjhH0R9Cw2h_PQObvWRjVZDXPVj2cUD2p7TiQHrisM-31fAOmWkXseIaCoqqUxwyiQuVURSRjZobKDE5-0uzEgjTs4uuAjpLAI7fmPo-NUssBpYvZqUrhH9bF2ILtPfwOq-f9SzAtb0_bAqHZTpleCsf8hHuHt2n99fO_gpbjyexYbqfTle4xXKywdwvwb0RItHrf6kJz9H3uoHeQwzofJ-pZ-f3n8gZt0P7cdHmpSh79Ka6qlliQ38XiSpfZ4Tfk4B_5cv8zP-b1Ofv9Mf6z3lbL_ynMeGez58cJTWbGz52PBGZNQW1bFsymOR82xui6mipqwrVsgpn8ay4KKcqlLyph6K6TBkqmU54znLm6LkNeP7pjgch1EKwUVT11TCIadFKL2Podlbd8tSztoqr3iVaTGQ9mnKMmbodQshY3HoujYFbVhvHg65Vj74f6oEFTS1lw_NnybCNliz1el2DuHuY6hZ95yY8zrspV22FH8N893ZP0jGAZgExLmZBP4dAAD__7bsyj0">