lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 9a551769 22/24: Disable floating-point compar


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 9a551769 22/24: Disable floating-point comparison warning
Date: Fri, 8 Jul 2022 07:11:28 -0400 (EDT)

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

    Disable floating-point comparison warning
    
    Incidentally, explain it the same way for both compilers.
---
 compiler_clang_warnings.make | 1 +
 compiler_gcc_warnings.make   | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler_clang_warnings.make b/compiler_clang_warnings.make
index 4959948c..fdeaa9db 100644
--- a/compiler_clang_warnings.make
+++ b/compiler_clang_warnings.make
@@ -47,6 +47,7 @@ clang_c_warnings := \
 
 # Write '-Wno' options at the end, with a rationale here.
 #
+# -Wfloat-equal: too many false positives, e.g., 0.0 == X
 # -Wlogical-op-parentheses: && is multiplicative; || is additive
 # -Wmismatched-tags: stylistic freedom--not a defect
 # -Wpadded: useful only for low-level work
diff --git a/compiler_gcc_warnings.make b/compiler_gcc_warnings.make
index 0a647387..546f4950 100644
--- a/compiler_gcc_warnings.make
+++ b/compiler_gcc_warnings.make
@@ -51,8 +51,7 @@ endif
 # -Wabi: useful only for a special purpose
 # -Wanalyzer-too-complex: not actually helpful
 # -Wdate-time: only for "bit-wise-identical reproducible compilations"
-# -Wfloat-equal: too many warnings on correct code, e.g.,
-#   exact comparison to zero
+# -Wfloat-equal: too many false positives, e.g., 0.0 == X
 # -Winline: 'inline' now refers to linkage, not inlining
 # -Wmissing-declarations: for C++, this flags valid functions that
 #   arguably belong in an unnamed namespace



reply via email to

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