[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
manywarnings: Don't enable -Wsystem-headers
From: |
Bruno Haible |
Subject: |
manywarnings: Don't enable -Wsystem-headers |
Date: |
Mon, 15 Jul 2024 23:08:58 +0200 |
GNU gettext makes use of the 'manywarnings' module.
In a build on macOS 12,13,14, the output of "make" contains more than
110000 warnings of type -Wnullability-completeness, that go away when
-Wsystem-headers is not added on the command line.
In a build on CentOS 7, the output of "make" contains more than 3500
warnings like
./time.h:42:3: warning: #include_next is a GCC extension [enabled by default]
that also go away when -Wsystem-headers is not added on the command line.
Since a package author cannot correct warning in "system headers"
(that is, system headers and gnulib header overrides) anyway, this
warning option is pointless also for other packages than GNU gettext.
This patch removes it from the 'manywarnings' module. And likewise for C++.
2024-07-15 Bruno Haible <bruno@clisp.org>
manywarnings: Don't enable -Wsystem-headers.
* build-aux/gcc-warning.spec: Add -Wsystem-headers.
* build-aux/g++-warning.spec: Likewise.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Don't enable
-Wsystem-headers.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL): Likewise.
diff --git a/build-aux/g++-warning.spec b/build-aux/g++-warning.spec
index 99ef3c8a8d..2235d65e60 100644
--- a/build-aux/g++-warning.spec
+++ b/build-aux/g++-warning.spec
@@ -85,6 +85,7 @@
-Wswitch-default
https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
-Wswitch-enum FIXME maybe? borderline. some will
want this
-Wsynth deprecated
+-Wsystem-headers warns about system headers on macOS and
#include_next in gnulib headers
-Wtabs fortran
-Wtarget-lifetime fortran
-Wtraditional-conversion obsolescent
diff --git a/build-aux/gcc-warning.spec b/build-aux/gcc-warning.spec
index e12fbe776e..53c6bef07d 100644
--- a/build-aux/gcc-warning.spec
+++ b/build-aux/gcc-warning.spec
@@ -348,6 +348,7 @@
-Wswitch-outside-range default
-Wswitch-unreachable default
-Wsynth deprecated
+-Wsystem-headers warns about system headers on macOS and
#include_next in gnulib headers
-Wtabs fortran
-Wtarget-lifetime fortran
-Wtautological-compare enabled by -Wall
diff --git a/m4/manywarnings-c++.m4 b/m4/manywarnings-c++.m4
index df190674f9..d8cf54b1cd 100644
--- a/m4/manywarnings-c++.m4
+++ b/m4/manywarnings-c++.m4
@@ -1,5 +1,5 @@
# manywarnings-c++.m4
-# serial 4
+# serial 5
dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -179,7 +179,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC_CXX_IMPL]
-Wswitch \
-Wswitch-bool \
-Wsync-nand \
- -Wsystem-headers \
-Wtrampolines \
-Wtrigraphs \
-Wtype-limits \
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 14bc5041ea..5b0baee205 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,5 +1,5 @@
# manywarnings.m4
-# serial 26
+# serial 27
dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C
-Wsuggest-final-methods \
-Wsuggest-final-types \
-Wsync-nand \
- -Wsystem-headers \
-Wtrampolines \
-Wuninitialized \
-Wunknown-pragmas \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- manywarnings: Don't enable -Wsystem-headers,
Bruno Haible <=