From: Paul Eggert Date: Mon, 19 Jan 2026 00:40:18 +0000 (-0800) Subject: manywarnings: omit two C++ options for C X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33462a64834d52bcdb1e40e2aedf4b5d8a54b85b;p=thirdparty%2Fgnulib.git manywarnings: omit two C++ options for C * build-aux/gcc-warning.spec: Update C++ warnings to match GCC 15.2.1 manual. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wsuggest-final-methods, -Wsuggest-final-types as they are C++. --- diff --git a/ChangeLog b/ChangeLog index 5290f14c21..dd3318325e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2026-01-18 Paul Eggert + + manywarnings: omit two C++ options for C + * build-aux/gcc-warning.spec: + Update C++ warnings to match GCC 15.2.1 manual. + * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove + -Wsuggest-final-methods, -Wsuggest-final-types as they are C++. + 2026-01-17 Paul Eggert manywarnings: update spec, too diff --git a/build-aux/gcc-warning.spec b/build-aux/gcc-warning.spec index 1149789818..8bac144d45 100644 --- a/build-aux/gcc-warning.spec +++ b/build-aux/gcc-warning.spec @@ -4,7 +4,7 @@ -W alias for -Wextra -WNSObject-attribute objc and objc++ -Wabi this is now a no-op --Wabi-tag c++ +-Wabi-tag c++ and objc++ -Wabi= c++ -Wabsolute-value enabled by -Wextra -Waddress enabled by -Wall @@ -139,7 +139,7 @@ -Wcoverage-too-many-paths default -Wcpp default -Wctad-maybe-unsupported c++ and objc++ --Wctor-dtor-privacy c++ +-Wctor-dtor-privacy c++ and objc++ -Wdangling-else enabled by -Wparentheses -Wdangling-pointer enabled by -Wall -Wdangling-pointer=<0,2> enabled by -Wall @@ -148,7 +148,7 @@ -Wdeclaration-missing-parameter-type default -Wdefaulted-function-deleted default, c++ and objc++ -Wdelete-incomplete c++ and objc++ --Wdelete-non-virtual-dtor c++ +-Wdelete-non-virtual-dtor c++ and objc++ -Wdeprecated default -Wdeprecated-copy c++ and objc++ -Wdeprecated-copy-dtor c++ and objc++ @@ -224,7 +224,7 @@ -Wintrinsic-shadow fortran -Wintrinsics-std fortran -Winvalid-constexpr c++ --Winvalid-imported-macros c++ and objc++ +-Winvalid-imported-macros c++ -Winvalid-memory-model default -Winvalid-offsetof c++ and objc++ -Winvalid-utf8 enabled by -finput-charset=UTF-8 @@ -357,7 +357,9 @@ -Wstringop-truncation default -Wsubobject-linkage c++ and objc++ -Wsuggest-attribute=returns_nonnull https://gcc.gnu.org/PR114833 --Wsuggest-override c++ and objc++ +-Wsuggest-final-methods c++ +-Wsuggest-final-types c++ +-Wsuggest-override c++ -Wsurprising fortran -Wswitch enabled by -Wall -Wswitch-bool default diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index 86de0bb8b7..0824226fa7 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 @@ -1,5 +1,5 @@ # manywarnings.m4 -# serial 31 +# serial 32 dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -110,8 +110,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)], -Wduplicated-branches \ -Wduplicated-cond \ -Wextra \ - -Wformat-signedness \ -Wflex-array-member-not-at-end \ + -Wformat-signedness \ -Winit-self \ -Winline \ -Winvalid-pch \ @@ -138,8 +138,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)], -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ - -Wsuggest-final-methods \ - -Wsuggest-final-types \ -Wsync-nand \ -Wtrampolines \ -Wuninitialized \