It would be nice to have some form of a builtin that shows that a portion of the code is not reachable, and it generates no code in the binary. gcc_unreachable() is used now in the gcc sources for this, but it will generate assembly code that calls abort(). Another way to accomplish the same thing could be with attributes Can attributes be used for function calls? I beleive right now they can't. If they could, then something like this could work: myfunc(foo,bar,baz) __attribute__((noreturn)); Some functions are known not to return only in certain situations, so they cannot be declared as being "noreturn". An example where this would be useful is the Fsignal function in emacs.
Actually gcc_unreachable is to make sure that the compiler is constaint. Really marking a path as unreachable is the same thing as using __builtin_expect.