Reuben Thomas wrote:

​I find them useful and switch them on, but given that others disagree, I
like your suggestion as it makes things consistent, and less likely to
confuse those who share my taste.

OK, thanks, no further comment so I installed the attached.
From f24fbe9d9297f57b632fbefd87770b4f39a611ef Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sun, 1 Jul 2018 07:08:32 -0700
Subject: [PATCH] manywarnings: omit -Wswitch-default

This should make things more consistent, as we already ignore
-Wswitch-enum.  Problem reported by Reuben Thomas; see:
https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
* build-aux/g++-warning.spec, build-aux/gcc-warning.spec:
Add -Wswitch-default.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Remove -Wswitch-default.
---
 ChangeLog                  | 10 ++++++++++
 build-aux/g++-warning.spec |  1 +
 build-aux/gcc-warning.spec |  1 +
 m4/manywarnings-c++.m4     |  3 +--
 m4/manywarnings.m4         |  3 +--
 5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e9f441..5f3ab00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2018-07-01  Paul Eggert  <egg...@cs.ucla.edu>
 
+	manywarnings: omit -Wswitch-default
+	This should make things more consistent, as we already ignore
+	-Wswitch-enum.  Problem reported by Reuben Thomas; see:
+	https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
+	* build-aux/g++-warning.spec, build-aux/gcc-warning.spec:
+	Add -Wswitch-default.
+	* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
+	* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
+	Remove -Wswitch-default.
+
 	regex: revert most trimming
 	Problems reported by Bruno Haible in:
 	https://lists.gnu.org/r/bug-gnulib/2018-07/msg00001.html
diff --git a/build-aux/g++-warning.spec b/build-aux/g++-warning.spec
index ae3e866..99ef3c8 100644
--- a/build-aux/g++-warning.spec
+++ b/build-aux/g++-warning.spec
@@ -82,6 +82,7 @@
 -Wstrict-prototypes			c
 -Wstrict-selector-match			objc and objc++
 -Wsurprising				fortran
+-Wswitch-default			https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
 -Wswitch-enum				FIXME maybe? borderline.  some will want this
 -Wsynth					deprecated
 -Wtabs					fortran
diff --git a/build-aux/gcc-warning.spec b/build-aux/gcc-warning.spec
index c47298e..8c0a3dc 100644
--- a/build-aux/gcc-warning.spec
+++ b/build-aux/gcc-warning.spec
@@ -121,6 +121,7 @@
 -Wsubobject-linkage			c++ and objc++
 -Wsuggest-override			c++ and objc++
 -Wsurprising				fortran
+-Wswitch-default			https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
 -Wswitch-enum				FIXME maybe? borderline.  some will want this
 -Wsynth					deprecated
 -Wtabs					fortran
diff --git a/m4/manywarnings-c++.m4 b/m4/manywarnings-c++.m4
index 3a4797d..28d9aa0 100644
--- a/m4/manywarnings-c++.m4
+++ b/m4/manywarnings-c++.m4
@@ -1,4 +1,4 @@
-# manywarnings-c++.m4 serial 1
+# manywarnings-c++.m4 serial 2
 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -180,7 +180,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC_CXX_IMPL],
     -Wsuggest-override \
     -Wswitch \
     -Wswitch-bool \
-    -Wswitch-default \
     -Wsync-nand \
     -Wsystem-headers \
     -Wtrampolines \
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 925c40e..516c587 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 15
+# manywarnings.m4 serial 16
 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -239,7 +239,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
     -Wsuggest-final-types \
     -Wswitch \
     -Wswitch-bool \
-    -Wswitch-default \
     -Wswitch-unreachable \
     -Wsync-nand \
     -Wsystem-headers \
-- 
2.7.4

Reply via email to