[libc-commits] [clang] [libc] Add clang warning if fp exception functions are called without appropriate flags/pragmas (PR #199009)

Marcos Ramirez Joos via libc-commits libc-commits at lists.llvm.org
Thu May 28 08:27:45 PDT 2026


================
@@ -37,26 +37,41 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 
-LIBC_INLINE int clear_except(int excepts) { return feclearexcept(excepts); }
+LIBC_INLINE int clear_except(int excepts) {
+#pragma STDC FENV_ACCESS ON
----------------
maarcosrmz wrote:

My bad, I see where this is going. I'll revert the commits here and create a separate PR. Thanks for your input!

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


More information about the libc-commits mailing list