mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 14:29:20 +03:00
Use _SDL_HAS_BUILTIN
I think this is because if you both check that __has_builtin is defined and use it in the same 'if' preprocessor statement, it can error because there's no equivalent to short-circuiting in preprocessor statements. _SDL_HAS_BUILTIN should be safer.
This commit is contained in:
1 parent
3758d61fe9
commit
aa2cf3ab4b
1 file changed
+1
-1
@@ -7,7 +7,7 @@ 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)
|
||||
#if _SDL_HAS_BUILTIN(__builtin_unreachable)
|
||||
__builtin_unreachable();
|
||||
#elif defined(_MSC_VER)
|
||||
__assume(0);
|
||||
|
||||
Reference in new issue
Block a user