[libc-commits] [libc] [llvm] [libc][c23][fenv] Implement fetestexceptflag (PR #87828)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Apr 15 15:38:10 PDT 2024


================
@@ -48,6 +54,8 @@ TEST(LlvmLibcFenvTest, GetExceptFlagAndSetExceptFlag) {
   LIBC_NAMESPACE::fputil::raise_except(FE_INVALID);
   fexcept_t eflags;
   LIBC_NAMESPACE::fegetexceptflag(&eflags, FE_ALL_EXCEPT);
+  ASSERT_EQ(LIBC_NAMESPACE::fetestexceptflag(&eflags, FE_ALL_EXCEPT),
+            FE_INVALID);
----------------
nickdesaulniers wrote:

Can you add one more `fetestexceptflag` after `fputil::raise_except(FE_OVERFLOW | FE_INEXACT)` that verifies that those 2 are set?

https://github.com/llvm/llvm-project/pull/87828


More information about the libc-commits mailing list