[libc-commits] [libc] [libc][math][NFC] Fix GCC diagnostics in math tests (PR #241530)
via libc-commits
libc-commits at lists.llvm.org
Wed Nov 11 21:08:59 PST 2026
================
@@ -21,7 +21,7 @@ TEST_F(LlvmLibcAcosf16Test, SpecialNumbers) {
EXPECT_FP_EQ_WITH_EXCEPTION(aNaN, LIBC_NAMESPACE::acosf16(sNaN), FE_INVALID);
EXPECT_MATH_ERRNO(0);
- EXPECT_FP_EQ(zero, LIBC_NAMESPACE::acosf16(1.0f));
+ EXPECT_FP_EQ(zero, LIBC_NAMESPACE::acosf16(0x1.0p+0f16));
----------------
lntue wrote:
we can't use `f16` literals because it will trigger compiler runtimes, which we are avoiding. Use `fputil::cast<float16>()` to wrap the float literals instead.
https://github.com/llvm/llvm-project/pull/241530
More information about the libc-commits
mailing list