[clang] [flang] [llvm] Add clang warning if fp exception functions are called without appropriate flags/pragmas (PR #199009)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 12:37:31 PDT 2026
================
@@ -20,6 +21,7 @@ using namespace Fortran::parser::literals;
void HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment(
FoldingContext &context) {
+ FLANG_FENV_ACCESS_ON
----------------
efriedma-quic wrote:
This isn't sufficient to get the right semantics.
The way SetUpHostFloatingPointEnvironment() is implemented, it is itself a function that isn't legal to call without appropriate flags/pragmas. So the caller (ApplyHostFunctionHelper) also needs FLANG_FENV_ACCESS_ON.
Same applies to other places. (Including, I think, the change from https://github.com/llvm/llvm-project/pull/200268.)
https://github.com/llvm/llvm-project/pull/199009
More information about the llvm-commits
mailing list