mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
gcc build fix
This commit is contained in:
parent
8381118a97
commit
a4554a7dfe
@ -72,6 +72,10 @@
|
||||
#endif
|
||||
#endif /* WIN32_VC */
|
||||
|
||||
#ifndef __has_builtin
|
||||
#define __has_builtin(x) 0
|
||||
#endif
|
||||
|
||||
// Use NODEFAULT to optimize a switch() stmt to tell MSVC to automatically go
|
||||
// to the final untested case after it has failed all the other cases (i.e.
|
||||
// 'assume at least one of the cases is always true')
|
||||
@ -79,7 +83,7 @@
|
||||
#define NODEFAULT default: assert(0); break;
|
||||
#elif defined(_MSC_VER)
|
||||
#define NODEFAULT default: __assume(0); // special VC keyword
|
||||
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || (defined(__has_builtin) && __has_builtin(__builtin_unreachable))
|
||||
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || __has_builtin(__builtin_unreachable)
|
||||
#define NODEFAULT default: __builtin_unreachable();
|
||||
#else
|
||||
#define NODEFAULT
|
||||
|
Loading…
x
Reference in New Issue
Block a user