[PATCH] D65997: Add options rounding and exceptions to pragma fp

Andy Kaylor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 13:30:59 PDT 2019


andrew.w.kaylor added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:3127
 
 The pragma can take three values: ``on``, ``fast`` and ``off``.  The ``on``
 option is identical to using ``#pragma STDC FP_CONTRACT(ON)`` and it allows
----------------
This part of the documentation is ambiguous in light of the new options. I suppose "[t]he pragma" here refers to "#pragma clang fp contract" but the first paragraph refers to "#pragma clang fp" as "the pragma."


================
Comment at: clang/docs/LanguageExtensions.rst:3152
+rounding mode. This option is experimental; the compiler may ignore an explicit
+rounding mode in some situations.
+
----------------
You should say something about whether the rounding mode is applied or assumed. The rounding mode argument in the constrained FP intrinsics is assumed. The compiler is not required to do anything to force the hardware into that rounding mode. I think we want that behavior here as well. I believe this follows the semantics of the STDC FENV_ROUND pragmas that were introduced by ISO TS-18661.


================
Comment at: clang/docs/LanguageExtensions.rst:3159
+This option is experimental; the compiler may ignore an explicit exception
+behavior in some situations.
+
----------------
I'm not sure what this is supposed to mean. What are the circumstances under which the compiler may ignore an explicit exception behavior? Do you mean that it isn't supposed to happen but it might while the feature is under development?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65997





More information about the cfe-commits mailing list