diff options
author | Tom Tromey <tom@tromey.com> | 2018-04-21 12:00:29 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-07 08:47:38 -0600 |
commit | aff689d36d66dd45a59008f3778d3d22e3cfcb9b (patch) | |
tree | 9111ec953d303c336f66a5961acba12fd6c92f09 /gdb/gdbserver | |
parent | ce887586b48acd02080c36d5495891116f886e8e (diff) | |
download | gdb-aff689d36d66dd45a59008f3778d3d22e3cfcb9b.zip gdb-aff689d36d66dd45a59008f3778d3d22e3cfcb9b.tar.gz gdb-aff689d36d66dd45a59008f3778d3d22e3cfcb9b.tar.bz2 |
Add -Wduplicated-cond
This adds -Wduplicated-cond to warnings.m4. This caught one bug.
I tried adding -Wduplicated-branches as well, but it results in some
spurious failures from code like this in cgen.h:
#define CGEN_ATTR_TYPE(n) \
struct { unsigned int bool_; \
CGEN_ATTR_VALUE_TYPE nonbool[(n) ? (n) : 1]; }
This will trigger a warning if passed n==1, which seems like a
perfectly valid thing to do; and there were other issues like this as
well.
ChangeLog
2018-05-07 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
gdbserver/ChangeLog
2018-05-07 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 4 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index f1dd1dd..7461359 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2018-05-07 Tom Tromey <tom@tromey.com> + + * configure: Rebuild. + 2018-05-04 Tom Tromey <tom@tromey.com> * configure: Rebuild. diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 919ed31..ac61ba3 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -7174,7 +7174,8 @@ build_warnings="-Wall -Wpointer-arith \ -Wno-mismatched-tags \ -Wno-error=deprecated-register \ -Wsuggest-override \ --Wimplicit-fallthrough" +-Wimplicit-fallthrough \ +-Wduplicated-cond" case "${host}" in *-*-mingw32*) |