On 3/7/21 6:04 AM, Reuben Thomas wrote:
I think leaving just -Wsystem-headers in the list would be fine, as it's a
good example where opinions differ on what's desirable, and is unlikely to
be added to the list of ignored warnings, while others come and go (easier
future maintenance of this example)!

Thanks, I'd like to have two or three warnings to give new readers a better feel. I installed the attached patch, which lists two other common warnings to suppress nowadays. Most likely it'll go out of date too; oh well.
>From f0d3a4d726d16b77b3fe7fb155b29ab792452a4f Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sun, 7 Mar 2021 13:47:02 -0800
Subject: [PATCH] manywarnings: modernize documentation

Problem reported by Reuben Thomas in:
https://lists.gnu.org/r/bug-gnulib/2021-03/msg00046.html
* doc/manywarnings.texi (manywarnings): Update in
the light of recent changes to the manywarnings module.
---
 ChangeLog             | 8 ++++++++
 doc/manywarnings.texi | 8 +++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a0c19fed6..cf72e260e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-03-07  Paul Eggert  <egg...@cs.ucla.edu>
+
+	manywarnings: modernize documentation
+	Problem reported by Reuben Thomas in:
+	https://lists.gnu.org/r/bug-gnulib/2021-03/msg00046.html
+	* doc/manywarnings.texi (manywarnings): Update in
+	the light of recent changes to the manywarnings module.
+
 2021-03-07  Bruno Haible  <br...@clisp.org>
 
 	sysexits: Fix for Haiku.
diff --git a/doc/manywarnings.texi b/doc/manywarnings.texi
index cb2cf295e..1b3e5907b 100644
--- a/doc/manywarnings.texi
+++ b/doc/manywarnings.texi
@@ -12,11 +12,9 @@ An example use of the module is as follows:
 gl_MANYWARN_ALL_GCC([warnings])
 # Set up the list of the pointless, undesired warnings.
 nw=
-nw="$nw -Wsystem-headers"       # Don't let system headers trigger warnings
-nw="$nw -Wundef"                # All compiler preprocessors support #if UNDEF
-nw="$nw -Wtraditional"          # All compilers nowadays support ANSI C
-nw="$nw -Wconversion"           # These warnings usually don't point to mistakes.
-nw="$nw -Wsign-conversion"      # Likewise.
+nw="$nw -Winline"           # It's OK to not inline.
+nw="$nw -Wstrict-overflow"  # It's OK to optimize strictly.
+nw="$nw -Wsystem-headers"   # Don't let system headers trigger warnings.
 # Enable all GCC warnings not in this list.
 gl_MANYWARN_COMPLEMENT([warnings], [$warnings], [$nw])
 for w in $warnings; do
-- 
2.27.0

Reply via email to