Documentation says g_assert_not_reached() should not be used in tests, but there's no alternative
The documentation of g_assert_not_reached()
says not to use it in tests, because it may get compiled out, similarly to g_assert()
. But unlike the case with g_assert()
, with g_assert_not_reached()
there's no practical alternative in GLib, so you'd have to write your own if you actually want to follow this advice. It's trivial to write, but we should have a standard macro.