1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2026-10-24 00:48:56 +03:00

manywarnings: deprecate -Whsa etc. too

-Whsa, -Wunreachable-code and -Wunsafe-loop-optimizations
are now ignored, so stop worrying about them too.
This commit is contained in:
Paul Eggert
2026-05-28 17:48:00 -07:00
parent 708c47b033
commit 8a3d803160
6 changed files with 15 additions and 18 deletions

View File

@@ -3,13 +3,17 @@
manywarnings: -Wstrict-overflow is deprecated
Issue reported by Drea Pinski in:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101913#c6
* HACKING: Stop recommending -Wstrict-overflow.
Also, -Whsa, -Wunreachable-code and -Wunsafe-loop-optimizations
are now ignored.
* HACKING: Stop recommending these options.
* build-aux/g++-warning.spec:
* build-aux/gcc-warning.spec: Say -Wstrict-overflow is deprecated.
* doc/manywarnings.texi (manywarnings): Stop mentioning it.
Remove -Whsa, -Wunreachable-code.
* doc/manywarnings.texi (manywarnings): Stop mentioning them.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Stop using it.
Omit them. Change shell script in comment so that we need
not worry about them when comparing GCC to us.
2026-05-27 Bruno Haible <bruno@clisp.org>

View File

@@ -322,7 +322,6 @@ there are three possible approaches:
-Wtrampolines
-Wuninitialized
-Wunknown-pragmas
-Wunsafe-loop-optimizations
-Wvariadic-macros
-Wvector-operation-performance
-Wwrite-strings
@@ -406,7 +405,6 @@ there are three possible approaches:
-Wtrampolines
-Wuninitialized
-Wunknown-pragmas
-Wunsafe-loop-optimizations
-Wvariadic-macros
-Wvector-operation-performance
-Wwrite-strings

View File

@@ -148,7 +148,6 @@
-Wfree-nonheap-object default
-Whardened default
-Wheader-guard enabled by -Wall
-Whsa default
-Wif-not-aligned default
-Wignored-attributes default
-Wignored-qualifiers enabled by -Wextra
@@ -274,7 +273,6 @@
-Wtype-limits enabled by -Wextra
-Wundef FIXME maybe? too many false positives
-Wunicode default
-Wunreachable-code obsolescent no-op
-Wunsuffixed-float-constants triggers warning in gnulib's timespec.h
-Wunterminated-string-initialization enabled by -Wextra
-Wunused enabled by -Wall

View File

@@ -63,8 +63,7 @@ follows:
@item
Start with the newest major release of GCC.
This will save you time, because some warning options produce many false
alarms with older versions of GCC (such as
@code{-Wunsafe-loop-optimizations}).
alarms with older versions of GCC.
@item
Consider the platforms commonly used when enabling GCC warnings.
This includes not only target architectures and operating systems, but also

View File

@@ -72,11 +72,11 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC_CXX_IMPL],
# List all gcc warning categories.
# To compare this list to your installed GCC's, run this Bash command:
#
# comm -3 \
# <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings-c++.m4 | sort) \
# <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
# grep -v -x -f <(
# awk '/^[^#]/ {print $1}' ../build-aux/g++-warning.spec))
# export LC_ALL=C && comm -3 \
# <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings-c++.m4; \
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
# <((gcc -Q --help=c++,warnings && gcc -Q --help=common,warnings) \
# | sed -n '/\[ignored]$/d;s/^ \(-[^ ]*\) .*/\1/p' | sort)
gl_manywarn_set=
for gl_manywarn_item in \
@@ -184,7 +184,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC_CXX_IMPL],
-Wtype-limits \
-Wuninitialized \
-Wunknown-pragmas \
-Wunsafe-loop-optimizations \
-Wunused \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \

View File

@@ -97,8 +97,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
# export LC_ALL=C && comm -3 \
# <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
# <((gcc --help=c,warnings && gcc --help=common,warnings) \
# | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
# <((gcc -Q --help=c,warnings && gcc -Q --help=common,warnings) \
# | sed -n '/\[ignored]$/d;s/^ \(-[^ ]*\) .*/\1/p' | sort)
$1=
for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
@@ -144,7 +144,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
-Wtrampolines \
-Wuninitialized \
-Wunknown-pragmas \
-Wunsafe-loop-optimizations \
-Wunused-macros \
-Wvariadic-macros \
-Wvector-operation-performance \