[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 47ba720 7/7: Handle a new warning differently
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 47ba720 7/7: Handle a new warning differently |
Date: |
Sun, 7 Jun 2020 18:03:30 -0400 (EDT) |
branch: master
commit 47ba720e5a388a0ba02dff67832b59f93a3daef2
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Handle a new warning differently
Commit c9d97d506bd of 20200428T2154Z added '-Wno-deprecated-copy' to
g++ flags in selected cases, to suppress a warning added in gcc-9,
although gcc-8 is still used in production. Unrecognized '-Wno-'
options are silently ignored...except when they are not:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
| When an unrecognized warning option is requested (e.g.,
| -Wunknown-warning), GCC emits a diagnostic stating that the
| option is not recognized. However, if the -Wno- form is used,
| the behavior is slightly different: no diagnostic is produced
| for -Wno-unknown-warning unless other diagnostics are being
| produced. This allows the use of new -Wno- options with old
| compilers, but if something goes wrong, the compiler warns
| that an unrecognized option is present.
The "if something goes wrong" effect being a nuisance, removed the
'-Wno-deprecated-copy' flag from makefiles, which as of the last
commit use '-isystem' to suppress this diagnostic in third-party
code. If it is caused by lmi code, that code should be fixed.
There is no need to remove '-Wno-deprecated-copy' from C++ files where
it is readily restricted to particular gcc versions. Such a restriction
cannot reasonably be coded in a makefile.
Tested with gcc-8.3 only.
---
workhorse.make | 4 ----
1 file changed, 4 deletions(-)
diff --git a/workhorse.make b/workhorse.make
index 8a73534..da12e5a 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -550,7 +550,6 @@ wx_dependent_objects :=
$(wx_dependent_objects): gcc_common_extra_warnings += \
-Wno-cast-function-type \
-Wno-cast-qual \
- -Wno-deprecated-copy \
-Wno-double-promotion \
-Wno-duplicated-branches \
-Wno-format-nonliteral \
@@ -578,13 +577,11 @@ operations_posix_windows.o: gcc_common_extra_warnings +=
-Wno-unused-parameter
# Some boost-1.33.1 libraries are incompatible with many warnings.
$(boost_filesystem_objects): gcc_common_extra_warnings += \
- -Wno-deprecated-copy \
-Wno-deprecated-declarations \
-Wno-unused-macros \
$(boost_regex_objects): gcc_common_extra_warnings += \
-Wno-conversion \
- -Wno-deprecated-copy \
-Wno-duplicated-branches \
-Wno-implicit-fallthrough \
-Wno-register \
@@ -599,7 +596,6 @@ boost_dependent_objects := \
test_coding_rules.o \
$(boost_dependent_objects): gcc_common_extra_warnings += \
- -Wno-deprecated-copy \
-Wno-switch-enum \
-Wno-unused-local-typedefs
- [lmi-commits] [lmi] master updated (f3ad703 -> 47ba720), Greg Chicares, 2020/06/07
- [lmi-commits] [lmi] master 47ba720 7/7: Handle a new warning differently,
Greg Chicares <=
- [lmi-commits] [lmi] master e66446d 4/7: nullptr, Greg Chicares, 2020/06/07
- [lmi-commits] [lmi] master ea1a8e0 1/7: Represent null pointer as 'nullptr' rather than '0', Greg Chicares, 2020/06/07
- [lmi-commits] [lmi] master 576993a 3/7: Catch even pointers by reference, Greg Chicares, 2020/06/07
- [lmi-commits] [lmi] master 4cdc992 5/7: Use 'override' where appropriate, Greg Chicares, 2020/06/07
- [lmi-commits] [lmi] master fe481a9 2/7: Remove superfluous semicolon, Greg Chicares, 2020/06/07
- [lmi-commits] [lmi] master 1372a42 6/7: Use '-isystem' to suppress warnings in third-party headers, Greg Chicares, 2020/06/07