mibintc added inline comments.
================ Comment at: clang/lib/Sema/SemaAttr.cpp:1020-1023 + // Resume the default rounding and exception modes. + NewFPFeatures.setRoundingModeOverride( + llvm::RoundingMode::NearestTiesToEven); + NewFPFeatures.setFPExceptionModeOverride(LangOptions::FPE_Ignore); ---------------- sepavloff wrote: > The previous values of rounding mode and exception behavior may differ from > the default values. For example, `#pragma STDC FENV_ROUND` may set constant > rounding direction different from FE_TONEAREST`. Similarly, command line > options may set exception behavior different from `ignore`. > Can pragma stack be used for this? > The previous values of rounding mode and exception behavior may differ from > the default values. For example, `#pragma STDC FENV_ROUND` may set constant > rounding direction different from FE_TONEAREST`. Similarly, command line > options may set exception behavior different from `ignore`. > Can pragma stack be used for this? I guess I could just NewFPFeatures.setAllowFEnvAccessOverride(false); and leave the other 2 unset, does that sound right? The values of the FPFeatures are being preserved around compound statements with FPFeaturesStateRAII Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87528/new/ https://reviews.llvm.org/D87528 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits