Improve helpers.h

Use C11 standard _Noreturn instead of attributes (except, of course, MSVC)
Remove unused helpers
Avoid trapping in release builds, in favor of just unreachability
Improve shim when __builtin_* are not available
This commit is contained in:
ISSOtm
2020-10-26 15:03:37 +01:00
parent 6c57ad2226
commit 0c55703438
10 changed files with 40 additions and 31 deletions

View File

@@ -66,7 +66,7 @@ void warning(struct FileStackNode const *where, uint32_t lineNo,
void error(struct FileStackNode const *where, uint32_t lineNo,
char const *fmt, ...) format_(printf, 3, 4);
noreturn_ void fatal(struct FileStackNode const *where, uint32_t lineNo,
_Noreturn void fatal(struct FileStackNode const *where, uint32_t lineNo,
char const *fmt, ...) format_(printf, 3, 4);
/**