Patchwork Add -Wstrict-null-sentinel

login
register
mail settings
Submitter Tom Tromey
Date Feb. 11, 2020, 2:49 p.m.
Message ID <20200211144936.23110-1-tromey@adacore.com>
Download mbox | patch
Permalink /patch/37966/
State New
Headers show

Comments

Tom Tromey - Feb. 11, 2020, 2:49 p.m.
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(-)
Tom Tromey - Feb. 11, 2020, 2:57 p.m.
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

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

Simon did exactly this in a different series, so I'm dropping this one.

Tom

Patch

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*)