https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84435
--- Comment #1 from Mário Feroldi <mferoldif at gmail dot com> --- Note that the following `foo`'s variant doesn't make the warning go away: int foo(E e) { (e == E::A || e == E::B || e == E::C) ? void() : __builtin_unreachable(); switch (e) { case E::A: return 0; case E::B: return 1; case E::C: return 2; } }