[PATCH] D93769: RFC [clang] Add support for option -ffp-eval-method and extend #pragma float_control similarly

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 23 10:00:49 PST 2020


mibintc added inline comments.


================
Comment at: clang/lib/Sema/SemaAttr.cpp:429
+  case PFC_Source:
+    //Builder.defineMacro("__FLT_EVAL_METHOD__", Twine("0"));
+    NewFPFeatures.setFPEvalMethodOverride(LangOptions::FEM_Source);
----------------
@rjmccall I would like to push a new value for __FLT_EVAL_METHOD__ at the start of the scope of this pragma, then pop that value of the macro to restore the previous setting when the scope is exited, should I do that in ParsePragma? Can I do that by injecting "pragma push_macro(...)" into the token stream, do you have other suggestion or is there something similar in clang that I can study how to do this? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93769



More information about the cfe-commits mailing list