[PATCH] D62731: Add support for options -frounding-math, -ftrapping-math, -ffp-model=, and -ffp-exception-behavior=, : Specify floating point behavior

Jeroen Dobbelaere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 05:03:08 PDT 2020


jeroen.dobbelaere added a comment.
Herald added a subscriber: dang.

Found some issue when looking at this code:  -ftrapping_math and -fno_trapping_math will never have effect



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3155
+  if (Args.hasArg(OPT_ftrapping_math)) {
+    Opts.setFPExceptionMode(LangOptions::FPE_Strict);
+  }
----------------
Calling 'Opts.setFPExceptionMode(xx)' here has no effect, as it will be overruled later on, on line 3174 !
Same is true on line 3159



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62731/new/

https://reviews.llvm.org/D62731





More information about the cfe-commits mailing list