Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 555 Bytes

unreachable.mkd

File metadata and controls

19 lines (12 loc) · 555 Bytes

Unreachable

C23 will get a feature based on __builtin_unreachable() compiler extensions to indicate unreachable control flow:

#include <stddef.h>

if (x)
   unreachable();

(This is a macros, I would have preferred this to be a function. C++ will have a function, and a function is useful: https://godbolt.org/z/r6fvK7Gvr)