mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-19 07:51:54 +00:00
Use __builtin_trap() for assertions on GCC and derivates
This commit is contained in:
parent
1d7d57d1f5
commit
bc07d06307
1 changed files with 4 additions and 4 deletions
|
@ -580,9 +580,9 @@ void AssertFailed( const char *file, int line, const char *expression ) {
|
|||
idLib::sys->DebugPrintf( "\n\nASSERTION FAILED!\n%s(%d): '%s'\n", file, line, expression );
|
||||
#ifdef _WIN32
|
||||
__asm int 0x03
|
||||
#elif defined( __linux__ )
|
||||
__asm__ __volatile__ ("int $0x03");
|
||||
#elif defined( MACOS_X )
|
||||
kill( getpid(), SIGINT );
|
||||
#elif defined( __GNUC__ )
|
||||
__builtin_trap();
|
||||
#else
|
||||
#error dont know how to crash :P
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue