mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 11:12:07 +00:00
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:
@@ -222,7 +222,7 @@ void error(const char *fmt, ...)
|
||||
nbErrors++;
|
||||
}
|
||||
|
||||
noreturn_ void fatalerror(const char *fmt, ...)
|
||||
_Noreturn void fatalerror(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
@@ -250,7 +250,7 @@ void warning(enum WarningID id, char const *fmt, ...)
|
||||
return;
|
||||
|
||||
case WARNING_DEFAULT:
|
||||
trap_;
|
||||
unreachable_();
|
||||
/* Not reached */
|
||||
|
||||
case WARNING_ENABLED:
|
||||
|
||||
Reference in New Issue
Block a user