mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-09-28 17:27:23 +02:00
18 lines
451 B
C
18 lines
451 B
C
|
#ifndef UNREACHABLE_H
|
||
|
#define UNREACHABLE_H
|
||
|
|
||
|
#include <SDL_stdinc.h>
|
||
|
|
||
|
SDL_NORETURN SDL_INLINE void VVV_unreachable(void)
|
||
|
{
|
||
|
/* __builtin_unreachable() and __assume(0) execute undefined behavior.
|
||
|
* Otherwise, a noreturn function returning is also undefined behavior. */
|
||
|
#if defined(__has_builtin) && __has_builtin(__builtin_unreachable)
|
||
|
__builtin_unreachable();
|
||
|
#elif defined(_MSC_VER)
|
||
|
__assume(0);
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
#endif /* UNREACHABLE_H */
|