On 11/29/21 6:09 AM, Richard Biener via Gcc-patches wrote:
This removes more cases that appear when bootstrap with -Wunreachable-code-return progresses.
...
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index 8ee0529d5a8..18e03c4cb96 100644 --- a/gcc/sel-sched-ir.h +++ b/gcc/sel-sched-ir.h @@ -1493,8 +1493,6 @@ bb_next_bb (basic_block bb) default: return bb->next_bb; } - - gcc_unreachable (); }
Just skiming the changes out of curiosity, this one makes me wonder if the warning shouldn't be taught to avoid triggering on calls to __builtin_unreachable(). They can help make code more readable (e.g., after a case and switch statement that handles all values). Martin