[libc-commits] [libc] [libc] Remove FE_ALL_EXCEPT check in hdr/fenv_macros.h. (PR #114446)
via libc-commits
libc-commits at lists.llvm.org
Thu Oct 31 11:43:45 PDT 2024
================
@@ -297,31 +297,35 @@ struct ModifyMXCSR {
#define EXPECT_FP_EXCEPTION(expected) \
do { \
if (math_errhandling & MATH_ERREXCEPT) { \
- EXPECT_EQ(LIBC_NAMESPACE::fputil::test_except(FE_ALL_EXCEPT) & \
- ((expected) ? (expected) : FE_ALL_EXCEPT), \
- (expected)); \
+ EXPECT_EQ( \
+ LIBC_NAMESPACE::fputil::test_except( \
+ static_cast<int>(FE_ALL_EXCEPT)) & \
+ ((expected) ? (expected) : static_cast<int>(FE_ALL_EXCEPT)), \
----------------
lntue wrote:
`fetestexcept` is specified to take an `int` instead of `unsigned int` https://en.cppreference.com/w/c/numeric/fenv/fetestexcept
https://github.com/llvm/llvm-project/pull/114446
More information about the libc-commits
mailing list