lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 091f66a1 1/5: Ask gcc to comply with IEEE 754


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 091f66a1 1/5: Ask gcc to comply with IEEE 754 more completely everywhere
Date: Sat, 11 Jun 2022 16:52:45 -0400 (EDT)

branch: master
commit 091f66a1c1b770137f2acff350e21b4846b4dd9a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Ask gcc to comply with IEEE 754 more completely everywhere
    
    Extended commit 212635583801a to all occurrences of '-frounding-math'.
---
 bin_exp.hpp              | 7 ++++---
 configure.ac             | 2 +-
 install_wx.sh            | 4 ++--
 install_wxpdfdoc.sh      | 4 ++--
 install_xml_libraries.sh | 1 +
 5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/bin_exp.hpp b/bin_exp.hpp
index 05106a1e..16357b0a 100644
--- a/bin_exp.hpp
+++ b/bin_exp.hpp
@@ -63,9 +63,10 @@
 ///
 /// The last line conditionally forms the reciprocal of 'y', which
 /// C++20 says is UB if ±0.0 == y. However, it's well defined by
-/// IEEE 754, and lmi is built with gcc's '-frounding-math' to choose
-/// IEEE 754 behavior, so it would be unreasonable for a compiler to
-/// perform any optimization that assumes otherwise. See:
+/// IEEE 754 (and lmi is built with compiler flags to prescribe
+/// IEEE 754 behavior to the fullest extent possible), so it would
+/// be unreasonable for a compiler to perform any optimization that
+/// assumes otherwise. See:
 ///   https://bugs.llvm.org/show_bug.cgi?id=19535#c1
 
 template<typename T>
diff --git a/configure.ac b/configure.ac
index c37c6b5d..a4b374dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,7 @@ if test "$lmi_cv_cxx_features" = "no"; then
 fi
 
 dnl These options must be always used for lmi unit tests to pass.
-common_options="-fno-ms-extensions -frounding-math"
+common_options="-fno-ms-extensions -frounding-math -fsignaling-nans"
 
 CFLAGS="$CFLAGS $common_options"
 CXXFLAGS="$CXXFLAGS $common_options"
diff --git a/install_wx.sh b/install_wx.sh
index 816ef2ca..8c416d53 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -63,8 +63,8 @@ vendor=${LMI_TRIPLET}-$gcc_version-$(git rev-parse --short 
HEAD:third_party/wx)
 # Configuration reference:
 #   https://lists.nongnu.org/archive/html/lmi/2007-11/msg00001.html
 
-wx_cc_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math'
-wx_cxx_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math'
+wx_cc_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math 
-fsignaling-nans'
+wx_cxx_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math 
-fsignaling-nans'
 
 config_options="
   --prefix=$prefix
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index 5f8581a1..953e3a14 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -54,8 +54,8 @@ case "$build_type" in
         ;;
 esac
 
-wxpdfdoc_cc_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math'
-wxpdfdoc_cxx_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math'
+wxpdfdoc_cc_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math 
-fsignaling-nans'
+wxpdfdoc_cxx_flags='-fno-ms-extensions -fno-omit-frame-pointer -frounding-math 
-fsignaling-nans'
 
 config_options="
   --prefix=$prefix
diff --git a/install_xml_libraries.sh b/install_xml_libraries.sh
index 3e3a3afb..3a4985f0 100755
--- a/install_xml_libraries.sh
+++ b/install_xml_libraries.sh
@@ -74,6 +74,7 @@ export PKG_CONFIG_SYSROOT_DIR=
 xmlsoft_common_cflags=$(echo '
   -fno-ms-extensions
   -frounding-math
+  -fsignaling-nans
   -Wno-cpp
   -Wno-discarded-qualifiers
   -Wno-format



reply via email to

[Prev in Thread] Current Thread [Next in Thread]