re-enable -Wunreachable-code under clang
whitelist the valid cases showing up If an earlier version of clang is showing more cases (particularly if they don't make sense), the re-enabling of the warning in sys/unix/hints/include/compiler.2020 can be made clang-version specific instead. I had no way to test earlier versions.
This commit is contained in:
@@ -23,6 +23,7 @@ boolean panicking;
|
||||
void panic(const char *, ...);
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
void panic
|
||||
VA_DECL(const char *, str)
|
||||
@@ -45,9 +46,11 @@ VA_DECL(const char *, str)
|
||||
abort(); /* generate core dump */
|
||||
#endif
|
||||
VA_END();
|
||||
/* UNREACHABLE_CODE */
|
||||
exit(EXIT_FAILURE); /* redundant */
|
||||
}
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
#ifdef ALLOCA_HACK
|
||||
|
||||
Reference in New Issue
Block a user