]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add two new warnings to warning.m4
authorTom Tromey <tromey@adacore.com>
Wed, 3 Jun 2026 19:03:31 +0000 (13:03 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 5 Jun 2026 20:51:13 +0000 (14:51 -0600)
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 <tdevries@suse.de>
gdb/configure
gdbserver/configure
gdbsupport/configure
gdbsupport/warning.m4

index 17c95930f606b1f78d9fb442aae8bf58f843c93d..80931d10bef410a43ba627878edda57a6ff77406 100755 (executable)
@@ -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 \
index 0159da6bdf47f4367417d49526c3822bd6a8ee11..46faecc3a207eb38956e7adab59b54d6dc78892b 100755 (executable)
@@ -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 \
index 584a80ef825548d7f43858867cf38e5bfbc89493..0bc9ff1db9a11be2f42d8afe9c7d55b9cce624bb 100755 (executable)
@@ -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 \
index 718ac34aa3c6abb77bc8302877efeb9f8a4ce9d8..3148feb740a7841fcec02142ede7c76ae60c8b80 100644 (file)
@@ -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 \