| Issue |
60636
|
| Summary |
Compound literal C99 warning
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
tfabric76
|
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]))
`
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs