The kernel has had a version of this since
c79cee71363d ("kernel: provide panicky version of unreachable"), and
userland can benefit from the same. unreachable is largely
inadequate because it's *not* an assertion of any sort, so we're not
really alerted to a problem that we could've anticipated.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
C23 added unreachable () to <stddef.h>. Wouldn't that be preferable to the leading __ for userland?
Comment Actions
My can't assume C23 in system headers, so we'd end up shimming it out with an __unreachable in <sys/cdefs.h> anyways to make it usable