]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
manywarnings: omit two C++ options for C
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Jan 2026 00:40:18 +0000 (16:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Jan 2026 00:40:53 +0000 (16:40 -0800)
* 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++.

ChangeLog
build-aux/gcc-warning.spec
m4/manywarnings.m4

index 5290f14c21bea9b0a5e97feed1b03b2833974a41..dd3318325e58de9efc5c87837bd3f2afbc3e449e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-01-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <eggert@cs.ucla.edu>
 
        manywarnings: update spec, too
index 1149789818ef186ca7a2398110164190655e6e3d..8bac144d45636691e632f43fda261633e5960309 100644 (file)
@@ -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
 -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
 -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++
 -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
 -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
index 86de0bb8b7ac4b1e4813f8648a068a0780957cfa..0824226fa71f818466917d85bcc5bdf62507f71b 100644 (file)
@@ -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 \