[clang] db4cb46 - [docs] Fix documentation of -fno-strict-float-cast-overflow after D115804.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 8 12:12:50 PST 2022


Author: Craig Topper
Date: 2022-01-08T12:12:44-08:00
New Revision: db4cb4668b046ae988914ae49105ff3cc0bc9d92

URL: https://github.com/llvm/llvm-project/commit/db4cb4668b046ae988914ae49105ff3cc0bc9d92
DIFF: https://github.com/llvm/llvm-project/commit/db4cb4668b046ae988914ae49105ff3cc0bc9d92.diff

LOG: [docs] Fix documentation of -fno-strict-float-cast-overflow after D115804.

Previously this was documented as having the behavior of the
"target's native float-to-int conversion". After D115804, clang
uses saturating FP cast intrinsics which have the same behavior
on all targets.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D116856

Added: 
    

Modified: 
    clang/docs/ReleaseNotes.rst
    clang/docs/UsersManual.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 7e24d06567fc3..d7c78c73ceb03 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -243,6 +243,9 @@ Floating Point Support in Clang
   -ffp-contract=fast, whereas the (now corrected) default behavior is
   -ffp-contract=on.
   -ffp-model=precise is now exactly the default mode of the compiler.
+- -fstrict-float-cast-overflow no longer has target specific behavior. Clang
+  will saturate towards the smallest and largest representable integer values.
+  NaNs will be converted to zero.
 
 Internal API Changes
 --------------------

diff  --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index d83b7a27bb3bd..5f46322f19af2 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -1380,8 +1380,8 @@ floating point semantic models: precise (the default), strict, and fast.
    When a floating-point value is not representable in a destination integer
    type, the code has undefined behavior according to the language standard.
    By default, Clang will not guarantee any particular result in that case.
-   With the 'no-strict' option, Clang attempts to match the overflowing behavior
-   of the target's native float-to-int conversion instructions.
+   With the 'no-strict' option, Clang will saturate towards the smallest and
+   largest representable integer values instead. NaNs will be converted to zero.
 
 .. _opt_fmath-errno:
 


        


More information about the cfe-commits mailing list