[PATCH] Add -Wstrict-null-sentinel

Tom Tromey tromey@adacore.com
Tue Feb 11 14:49:00 GMT 2020


Tom de Vries sent a patch to make gdb compile when
-Wstrict-null-sentinel.  Simon recommended adding this to warning.m4.
That is what this patch does.

Tested by rebuilding on x86-64 Fedora 30.

gdb/ChangeLog
2020-02-11  Tom Tromey  <tromey@adacore.com>

	* configure: Rebuild.
	* warning.m4 (AM_GDB_WARNINGS): Add -Wstrict-null-sentinel.

gdbserver/ChangeLog
2020-02-11  Tom Tromey  <tromey@adacore.com>

	* configure: Rebuild for -Wstrict-null-sentinel.

Change-Id: I0292304411e19283e877e420958970a19198ab07
---
 gdb/ChangeLog       | 5 +++++
 gdb/configure       | 3 ++-
 gdb/warning.m4      | 3 ++-
 gdbserver/ChangeLog | 4 ++++
 gdbserver/configure | 3 ++-
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index a1d15064972..2ce910c808c 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -16111,7 +16111,8 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
--Wmissing-declarations"
+-Wmissing-declarations \
+-Wstrict-null-sentinel"
 
 case "${host}" in
   *-*-mingw32*)
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index e2b8a43ddbd..75bc21ca426 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -50,7 +50,8 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
--Wmissing-declarations"
+-Wmissing-declarations \
+-Wstrict-null-sentinel"
 
 case "${host}" in
   *-*-mingw32*)
diff --git a/gdbserver/configure b/gdbserver/configure
index 4b9d7e3718f..bd0e667af69 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -9815,7 +9815,8 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
--Wmissing-declarations"
+-Wmissing-declarations \
+-Wstrict-null-sentinel"
 
 case "${host}" in
   *-*-mingw32*)
-- 
2.21.1



More information about the Gdb-patches mailing list