]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdbserver/ChangeLog
Add -Wduplicated-cond
authorTom Tromey <tom@tromey.com>
Sat, 21 Apr 2018 18:00:29 +0000 (12:00 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 7 May 2018 14:47:38 +0000 (08:47 -0600)
commitaff689d36d66dd45a59008f3778d3d22e3cfcb9b
tree9111ec953d303c336f66a5961acba12fd6c92f09
parentce887586b48acd02080c36d5495891116f886e8e
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.
gdb/ChangeLog
gdb/configure
gdb/gdbserver/ChangeLog
gdb/gdbserver/configure
gdb/warning.m4