Commit 0ef58149 authored by Richard Gobeille's avatar Richard Gobeille

engine: #define EDUKE32_UNREACHABLE_SECTION as debug_break() in DEBUG builds

parent dd7594f8
......@@ -177,14 +177,17 @@
#define EDUKE32_PREDICT_FALSE(x) (x)
#endif
#if EDUKE32_GCC_PREREQ(4,5) || __has_builtin(__builtin_unreachable)
#define EDUKE32_UNREACHABLE_SECTION(...) __builtin_unreachable()
#elif _MSC_VER
#define EDUKE32_UNREACHABLE_SECTION(...) __assume(0)
#ifdef DEBUG
# define EDUKE32_UNREACHABLE_SECTION(...) debug_break()
#else
#define EDUKE32_UNREACHABLE_SECTION(...) __VA_ARGS__
# if EDUKE32_GCC_PREREQ(4,5) || __has_builtin(__builtin_unreachable)
# define EDUKE32_UNREACHABLE_SECTION(...) __builtin_unreachable()
# elif _MSC_VER
# define EDUKE32_UNREACHABLE_SECTION(...) __assume(0)
# else
# define EDUKE32_UNREACHABLE_SECTION(...) __VA_ARGS__
# endif
#endif
#if EDUKE32_GCC_PREREQ(2,0) || defined _MSC_VER
# define EDUKE32_FUNCTION __FUNCTION__
#elif CSTD >= 1999 || CXXSTD >= 2011
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment