Explorar o código

AK: Never use assert() when targeting Windows platforms

The Windows CRT definition of assert() is not noreturn, and causes
compile errors when using it as the backing for VERIFY() in debug
configurations of applications like the Jakt compiler.
Andrew Kaster %!s(int64=2) %!d(string=hai) anos
pai
achega
cd2a6767bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AK/Assertions.h

+ 1 - 1
AK/Assertions.h

@@ -11,7 +11,7 @@
 #else
 #    include <assert.h>
 extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
-#    ifndef NDEBUG
+#    if !defined(NDEBUG) && !defined(WIN32)
 #        define VERIFY assert
 #    else
 #        define __stringify_helper(x) #x