util/compat: include assert(0) in UNREACHABLE macro
Stop overriding it in log.h
This commit is contained in:
parent
6c30decd8e
commit
15bdbc496b
2 changed files with 4 additions and 3 deletions
|
@ -138,8 +138,6 @@ void log_remove_filters(void);
|
|||
|
||||
#if defined(DEBUG) && !defined(__EMSCRIPTEN__)
|
||||
#define log_debug(...) log_custom(LOG_DEBUG, __VA_ARGS__)
|
||||
#undef UNREACHABLE
|
||||
#define UNREACHABLE log_fatal("This code should never be reached (%s:%i)", _TAISEI_SRC_FILE, __LINE__)
|
||||
#else
|
||||
#define log_debug(...) ((void)0)
|
||||
// #define LOG_NO_FILENAMES
|
||||
|
|
|
@ -80,7 +80,10 @@
|
|||
#endif
|
||||
|
||||
#define PRAGMA(p) _Pragma(#p)
|
||||
#define UNREACHABLE __builtin_unreachable()
|
||||
#define UNREACHABLE ({ \
|
||||
assert(0, "This code should never be reachable"); \
|
||||
__builtin_unreachable(); \
|
||||
})
|
||||
#define DIAGNOSTIC(x) PRAGMA(GCC diagnostic x)
|
||||
|
||||
#if defined(__clang__)
|
||||
|
|
Loading…
Reference in a new issue