From e9f26cccdde7ca6e0941bb4b9066665a68c5bc42 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Fri, 28 Apr 2017 17:30:14 +0200 Subject: [PATCH] gcc 7 port Testing the release candidate revealed only one minor issue, namely a new warning -Wimplicit-fallthrough (part of -Wextra) triggers in the movepicker. This can be silenced by adding a comment, and once we move to c++17 by adding a standard annotation [[fallthrough]];. No functional change. Closes #1090 --- src/movepick.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/movepick.cpp b/src/movepick.cpp index d0ea367a..992657e7 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -196,6 +196,7 @@ Move MovePicker::next_move(bool skipQuiets) { endMoves = generate(pos, cur); score(); ++stage; + /* fallthrough */ case GOOD_CAPTURES: while (cur < endMoves) @@ -218,6 +219,7 @@ Move MovePicker::next_move(bool skipQuiets) { && pos.pseudo_legal(move) && !pos.capture(move)) return move; + /* fallthrough */ case KILLERS: ++stage; @@ -227,6 +229,7 @@ Move MovePicker::next_move(bool skipQuiets) { && pos.pseudo_legal(move) && !pos.capture(move)) return move; + /* fallthrough */ case COUNTERMOVE: ++stage; @@ -238,6 +241,7 @@ Move MovePicker::next_move(bool skipQuiets) { && pos.pseudo_legal(move) && !pos.capture(move)) return move; + /* fallthrough */ case QUIET_INIT: cur = endBadCaptures; @@ -245,6 +249,7 @@ Move MovePicker::next_move(bool skipQuiets) { score(); partial_insertion_sort(cur, endMoves, -4000 * depth / ONE_PLY); ++stage; + /* fallthrough */ case QUIET: while ( cur < endMoves @@ -260,6 +265,7 @@ Move MovePicker::next_move(bool skipQuiets) { } ++stage; cur = moves; // Point to beginning of bad captures + /* fallthrough */ case BAD_CAPTURES: if (cur < endBadCaptures) @@ -271,6 +277,7 @@ Move MovePicker::next_move(bool skipQuiets) { endMoves = generate(pos, cur); score(); ++stage; + /* fallthrough */ case ALL_EVASIONS: while (cur < endMoves) @@ -286,6 +293,7 @@ Move MovePicker::next_move(bool skipQuiets) { endMoves = generate(pos, cur); score(); ++stage; + /* fallthrough */ case PROBCUT_CAPTURES: while (cur < endMoves) @@ -302,6 +310,7 @@ Move MovePicker::next_move(bool skipQuiets) { endMoves = generate(pos, cur); score(); ++stage; + /* fallthrough */ case QCAPTURES_1: case QCAPTURES_2: while (cur < endMoves) @@ -315,6 +324,7 @@ Move MovePicker::next_move(bool skipQuiets) { cur = moves; endMoves = generate(pos, cur); ++stage; + /* fallthrough */ case QCHECKS: while (cur < endMoves) @@ -330,6 +340,7 @@ Move MovePicker::next_move(bool skipQuiets) { endMoves = generate(pos, cur); score(); ++stage; + /* fallthrough */ case QRECAPTURES: while (cur < endMoves) -- 2.39.2