aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-26 22:46:54 -0600
committerTom Tromey <tom@tromey.com>2018-04-27 12:53:14 -0600
commit632e107b32c0fe8aede62e070b00756e9fdd2c01 (patch)
tree33106f00d62048ea028bdad94f0df1c21a463f3b /gdb/gdbserver
parent197b262f98ff01516921b3d3056d86a9577535be (diff)
downloadgdb-632e107b32c0fe8aede62e070b00756e9fdd2c01.zip
gdb-632e107b32c0fe8aede62e070b00756e9fdd2c01.tar.gz
gdb-632e107b32c0fe8aede62e070b00756e9fdd2c01.tar.bz2
Enable -Wsuggest-override
I noticed the existence of -Wsuggest-override and so this patch enables it for gdb. It found a few spots that could use "override". Also I went ahead and removed all uses of the "OVERRIDE" macro. Using override is beneficial because it makes it harder to change a base class and then forget to change a derived class. Tested by the buildbot. ChangeLog 2018-04-27 Tom Tromey <tom@tromey.com> * configure: Rebuild. * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override. * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not "OVERRIDE". (class symbol_needs_eval_context): Likewise. * dwarf2read.c (mock_mapped_index::symbol_name_count) (mock_mapped_index::symbol_name_at): Use "override". Remove "virtual". * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use "override". (class dwarf_expr_executor): Use "override", not "OVERRIDE". * aarch64-tdep.c (instruction_reader::read): Use "override". (instruction_reader_test::read): Likewise. * arm-tdep.c (instruction_reader::read): Use "override". (instruction_reader_thumb::read): Likewise. gdbserver/ChangeLog 2018-04-27 Tom Tromey <tom@tromey.com> * configure: Rebuild.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rwxr-xr-xgdb/gdbserver/configure3
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 2fbc5ba..0cdb1c2 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2018-04-27 Tom Tromey <tom@tromey.com>
+
+ * configure: Rebuild.
+
2018-04-23 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 5b3dee4..22b4c8a 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -7172,7 +7172,8 @@ build_warnings="-Wall -Wpointer-arith \
-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
-Wno-mismatched-tags \
--Wno-error=deprecated-register"
+-Wno-error=deprecated-register \
+-Wsuggest-override"
case "${host}" in
*-*-mingw32*)