How to hint to GCC that a line should be unreachable at compile time?
问题 It's common for compilers to provide a switch to warn when code is unreachable. I've also seen macros for some libraries, that provide assertions for unreachable code. Is there a hint, such as through a pragma, or builtin that I can pass to GCC (or any other compilers for that matter), that will warn or error during compilation if it's determined that a line expected to be unreachable can actually be reached? Here's an example: if (!conf->devpath) { conf->devpath = arg; return 0; } // pass