// { dg-options "-std=gnu++23" } // { dg-do compile { target c++23 } } #include #ifndef __cpp_lib_unreachable # error "Feature-test macro for unreachable missing in " #elif __cpp_lib_unreachable != 202202L # error "Feature-test macro for unreachable has wrong value in " #endif bool test01(int i) { if (i == 4) return true; std::unreachable(); } // { dg-bogus "control reaches end of non-void function" }