[PATCH] D119290: [Clang] Add support for -fcx-limited-range, -fcx-fortran-rules options.

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 07:18:37 PDT 2022


zahiraam added inline comments.
Herald added a subscriber: MaskRay.
Herald added a project: All.


================
Comment at: clang/include/clang/Driver/Options.td:1853
+def fcx_fortran_rules : Flag<["-"], "fcx-fortran-rules">, Group<f_Group>;
+def fnocx_fortran_rules : Flag<["-"], "fnocx-fortran-rules">, Group<f_Group>;
+def cx_rangeEQ : Joined<["-"], "fcx-range=">, Group<f_Group>, Flags<[CC1Option]>,
----------------
mdtoguchi wrote:
> Typical negate syntax would use `-fno-cx-*`
+1.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2958
       FPContract = "fast";
+      CxRangeArg = LangOptions::CX_NoNan;
       break;
----------------
mdtoguchi wrote:
> Is there any need to disable any settings for `-fno-fast-math`?
Yes. Under the fno-fast-math the fcx-limited-range is disabled. So we need a to set the CxRangeArg to a value that illustrate that, LangOptions::CX_None?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119290



More information about the cfe-commits mailing list