On 24.08.2022 12:22, Juergen Gross wrote:
> Hitting an ASSERT_UNREACHABLE() is always wrong, so even in production
> builds a warning seems to be appropriate when hitting one.

I disagree, for two reasons: This violates the implication of NDEBUG
meaning ASSERT() and friends expand to no actual code. Plus if doing so
for ASSERT_UNREACHABLE(), why would we not do the same for ASSERT()?
There's a reason we have ASSERT() and friends and, independently,
WARN_ON() / BUG_ON() et al.

Jan

Reply via email to