mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
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.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2018-05-07 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* configure: Rebuild.
|
||||
* warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
|
||||
|
||||
2018-05-07 Tom Tromey <tom@tromey.com>
|
||||
|
||||
PR tdep/20362:
|
||||
|
3
gdb/configure
vendored
3
gdb/configure
vendored
@ -15367,7 +15367,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*)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2018-05-07 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* configure: Rebuild.
|
||||
|
||||
2018-05-04 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* configure: Rebuild.
|
||||
|
3
gdb/gdbserver/configure
vendored
3
gdb/gdbserver/configure
vendored
@ -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*)
|
||||
|
@ -44,7 +44,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*)
|
||||
|
Reference in New Issue
Block a user