[binutils-gdb] Add two new warnings to warning.m4
Tom Tromey via Gdb-cvs <[email protected]> Fri, 5 Jun 2026 21:01:00 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eba7a4ccfb5e58e1701bcb22d4f5203804dd19b8 commit eba7a4ccfb5e58e1701bcb22d4f5203804dd19b8 Author: Tom Tromey <[email protected]> Date: Wed Jun 3 13:03:31 2026 -0600 Add two new warnings to warning.m4 I recently learned that GCC has improved -Wdangling-reference and added -Wunterminated-string-initialization. Both of these seem sensible to me, so this patch adds them to warning.m4. gdb rebuilds cleanly with this in place on x86-64 Fedora 43. Reviewed-By: Tom de Vries <[email protected]> Diff: --- gdb/configure | 2 ++ gdbserver/configure | 2 ++ gdbsupport/configure | 2 ++ gdbsupport/warning.m4 | 2 ++ 4 files changed, 8 insertions(+) diff --git a/gdb/configure b/gdb/configure index 17c95930f60..80931d10bef 100755 --- a/gdb/configure +++ b/gdb/configure @@ -31580,6 +31580,7 @@ fi # The options we'll try to enable. build_warnings=" \ -Wall \ +-Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ -Wduplicated-cond \ @@ -31597,6 +31598,7 @@ build_warnings=" \ -Wshadow=local \ -Wstrict-null-sentinel \ -Wsuggest-override \ +-Wunterminated-string-initialization \ -Wunused-but-set-parameter \ -Wunused-but-set-variable \ -Wunused-const-variable=1 \ diff --git a/gdbserver/configure b/gdbserver/configure index 0159da6bdf4..46faecc3a20 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -13448,6 +13448,7 @@ fi # The options we'll try to enable. build_warnings=" \ -Wall \ +-Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ -Wduplicated-cond \ @@ -13465,6 +13466,7 @@ build_warnings=" \ -Wshadow=local \ -Wstrict-null-sentinel \ -Wsuggest-override \ +-Wunterminated-string-initialization \ -Wunused-but-set-parameter \ -Wunused-but-set-variable \ -Wunused-const-variable=1 \ diff --git a/gdbsupport/configure b/gdbsupport/configure index 584a80ef825..0bc9ff1db9a 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -14123,6 +14123,7 @@ fi # The options we'll try to enable. build_warnings=" \ -Wall \ +-Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ -Wduplicated-cond \ @@ -14140,6 +14141,7 @@ build_warnings=" \ -Wshadow=local \ -Wstrict-null-sentinel \ -Wsuggest-override \ +-Wunterminated-string-initialization \ -Wunused-but-set-parameter \ -Wunused-but-set-variable \ -Wunused-const-variable=1 \ diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4 index 718ac34aa3c..3148feb740a 100644 --- a/gdbsupport/warning.m4 +++ b/gdbsupport/warning.m4 @@ -38,6 +38,7 @@ fi # The options we'll try to enable. build_warnings=" \ -Wall \ +-Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ -Wduplicated-cond \ @@ -55,6 +56,7 @@ build_warnings=" \ -Wshadow=local \ -Wstrict-null-sentinel \ -Wsuggest-override \ +-Wunterminated-string-initialization \ -Wunused-but-set-parameter \ -Wunused-but-set-variable \ -Wunused-const-variable=1 \