lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 892f179c 2/5: Enable another warning


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 892f179c 2/5: Enable another warning
Date: Sat, 11 Jun 2022 21:34:06 -0400 (EDT)

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

    Enable another warning
    
    Enabled '-Winit-self' for C++, not just C.
    
    Incidentally added explicit '-Wno-' options for warnings that are
    deliberately not enabled, with an explanation for each.
---
 workhorse.make | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/workhorse.make b/workhorse.make
index 2e8fa8e1..3add7411 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -554,9 +554,6 @@ endif
 treat_warnings_as_errors := -pedantic-errors -Werror
 
 # Write '-Wno' options at the end.
-#
-# Rationale for specific warning options:
-# -Wno-parentheses [its diagnostics are beyond pedantic]
 
 gcc_common_warnings := \
   $(treat_warnings_as_errors) \
@@ -581,6 +578,7 @@ gcc_common_warnings := \
   -Wformat-signedness \
   -Wformat-y2k \
   -Wimport \
+  -Winit-self \
   -Winvalid-pch \
   -Wlogical-op \
   -Wmissing-include-dirs \
@@ -602,13 +600,25 @@ gcc_common_warnings := \
   -Wunused-macros \
   -Wvector-operation-performance \
   -Wvla \
+  -Wno-date-time \
+  -Wno-float-equal \
+  -Wno-inline \
+  -Wno-missing-declarations \
   -Wno-parentheses \
+  -Wno-switch-default \
+  -Wno-unsafe-loop-optimizations \
 
 # Warnings that are not generally useful.
 #
 # -Wdate-time: only for "bit-wise-identical reproducible compilations"
+# -Wfloat-equal: too many warnings on correct code, e.g.,
+#   exact comparison to zero
+# -Winline: 'inline' now refers to linkage, not inlining
 # -Wmissing-declarations: for C++, this flags valid functions that
 #   arguably belong in an unnamed namespace
+# -Wparentheses: its diagnostics are beyond pedantic
+# -Wswitch-default: false positives for switches on enums that
+#   include all cases (verified by -Wswitch-enum)
 # -Wunsafe-loop-optimizations: incompatible with ranged for-loops
 
 # Consider these later:
@@ -619,7 +629,6 @@ gcc_c_warnings := \
   $(gcc_common_warnings) \
   -Wbad-function-cast \
   -Wc++-compat \
-  -Winit-self \
   -Wjump-misses-init \
   -Wmissing-prototypes \
   -Wnested-externs \
@@ -656,6 +665,9 @@ gcc_cxx_warnings := \
   -Wsynth \
   -Wuseless-cast \
   -Wzero-as-null-pointer-constant \
+  -Wno-sign-promo \
+  -Wno-suggest-final-methods \
+  -Wno-suggest-final-types \
 
 # Warnings that are not generally useful.
 #
@@ -666,8 +678,6 @@ gcc_cxx_warnings := \
 #   work with '-Wsuggest-final-types' first, because making a class
 #   final may resolve '-Wsuggest-final-methods' suggestions for its
 #   members; but expect many false positives
-# -Wfloat-equal: too many warnings on correct code, e.g.,
-#   exact comparison to zero
 
 # Consider these later:
 postponed_gcc_cxx_warnings := \



reply via email to

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