[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2d6a27f6 6/6: Explicitly enable '-Wpedantic'
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2d6a27f6 6/6: Explicitly enable '-Wpedantic' for gcc |
Date: |
Sun, 10 Jul 2022 12:07:57 -0400 (EDT) |
branch: master
commit 2d6a27f678207604bd60866312067e99e2d777cb
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Explicitly enable '-Wpedantic' for gcc
Commit 1a2c6b496fbf1 of 20051031T0342Z replaced three flags with two:
- -pedantic \
- -pedantic-errors \
- -Werror \
+treat_warnings_as_errors := -pedantic-errors -Werror
evidently in the belief that '-pedantic-errors' implies '-pedantic'.
The gcc documentation suggests otherwise:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
| -pedantic-errors ... is not equivalent to -Werror=pedantic, since
| there are errors enabled by this option and not enabled by the
| latter and vice versa. ...
| -Werror=switch turns the warnings controlled by -Wswitch into errors.
| ... -Werror=foo automatically implies -Wfoo.
It says, therefore, that there are errors enabled by '-Wpedantic' that
are not enabled by '-pedantic-errors', even though
make show_overlooked_cxx_warnings
suggests otherwise. Added '-Wpedantic' anyway because it's harmless even
if redundant.
The documentation lists '-Wpedantic' and '-pedantic' together, with a
common definition, so those two must be equivalent. Apparently the '-W'
alias was introduced in gcc-4.8 or so.
---
compiler_gcc_warnings.make | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler_gcc_warnings.make b/compiler_gcc_warnings.make
index d2ed5fd2..e6535d9f 100644
--- a/compiler_gcc_warnings.make
+++ b/compiler_gcc_warnings.make
@@ -99,6 +99,7 @@ gcc_common_warnings := \
-Wmultichar \
-Wnull-dereference \
-Wpacked \
+ -Wpedantic \
-Wpointer-arith \
-Wredundant-decls \
-Wrestrict \
- [lmi-commits] [lmi] master updated (4725c239 -> 2d6a27f6), Greg Chicares, 2022/07/10
- [lmi-commits] [lmi] master 4e5b0c9f 5/6: Enable '-Wcomma' for clang, Greg Chicares, 2022/07/10
- [lmi-commits] [lmi] master 3ea404eb 2/6: Split a long line in a script, Greg Chicares, 2022/07/10
- [lmi-commits] [lmi] master f88b1534 3/6: Inhibit wine-6.0.3 nuisance messages, Greg Chicares, 2022/07/10
- [lmi-commits] [lmi] master 2d6a27f6 6/6: Explicitly enable '-Wpedantic' for gcc,
Greg Chicares <=
- [lmi-commits] [lmi] master b0af553d 1/6: Filter out nuisance message from debian 'wine' script, Greg Chicares, 2022/07/10
- [lmi-commits] [lmi] master 3f80558d 4/6: Explain why several clang warnings are disabled, Greg Chicares, 2022/07/10