mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 01:36:46 +08:00
Attempt to fix the GCC travis build
This commit is contained in:
parent
1e1f5cdf5b
commit
f7fabd8ba3
@ -238,9 +238,11 @@ private:
|
||||
|
||||
/// Hint for the compiler that this point should be unreachable
|
||||
[[noreturn]] inline void unreachable() {
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER)
|
||||
__assume(false);
|
||||
#elif __has_builtin(__builtin_unreachable)
|
||||
#elif defined(__GNUC__)
|
||||
__builtin_unreachable();
|
||||
#elif defined(__has_builtin) && __has_builtin(__builtin_unreachable)
|
||||
__builtin_unreachable();
|
||||
#endif
|
||||
}
|
||||
@ -248,9 +250,11 @@ private:
|
||||
/// Causes the application to exit abnormally because we are
|
||||
/// in an invalid state.
|
||||
[[noreturn]] inline void trap() {
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER)
|
||||
__debugbreak();
|
||||
#elif __has_builtin(__builtin_trap)
|
||||
#elif defined(__GNUC__)
|
||||
__builtin_trap();
|
||||
#elif defined(__has_builtin) && __has_builtin(__builtin_trap)
|
||||
__builtin_trap();
|
||||
#else
|
||||
*(volatile int*)0 = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user