From e5f2711091273670d3de9f630c2ebe656194abff Mon Sep 17 00:00:00 2001 From: bumbread Date: Sun, 7 Aug 2022 23:19:31 +1100 Subject: [PATCH] Handle cuikc in assert --- inc/assert.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/assert.h b/inc/assert.h index 8b9200f..0312334 100644 --- a/inc/assert.h +++ b/inc/assert.h @@ -15,11 +15,10 @@ void _assert( #if defined(NDEBUG) #define assert(ignore) ((void)0) #elif defined(_DEBUG) - #if __GNUC__ + #if defined(__GNUC__) || defined(__CUIKC__) #define assert(c) if (!(c)) __builtin_trap() - #elif _MSC_VER + #elif defined(_MSC_VER) #define assert(c) if (!(c)) __debugbreak() - // TODO: Handle Cuik, and if such handling is not required remove this comment #else // In debug mode there shouldn't be any optimizations so this should // work as a simple way to cause a trap.