From 72652a088f11ee089ed780b94308436c8b9d3f9a Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 25 Nov 2012 23:13:59 +0400 Subject: [PATCH] Fix ABORT definition for mingw32ce (WinCE) * include/private/gc_priv.h (ABORT): Define as block statement (instead of expression) for Win32/WinCE (unless NO_DEBUGGING) because DebugBreak is defined as a statement in some toolchains (e.g., mingw32ce). --- include/private/gc_priv.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 2d716d4b..fb0d9644 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -476,9 +476,10 @@ typedef char * ptr_t; /* A generic pointer to which we can add */ # elif defined(MSWINCE) && defined(NO_DEBUGGING) # define ABORT(msg) (GC_on_abort(msg), ExitProcess(-1)) # elif defined(MSWIN32) || defined(MSWINCE) -# define ABORT(msg) (GC_on_abort(msg), DebugBreak()) - /* Note that on a WinCE box, this could be silently */ - /* ignored (i.e., the program is not aborted). */ +# define ABORT(msg) { GC_on_abort(msg); DebugBreak(); } + /* Note that: on a WinCE box, this could be silently */ + /* ignored (i.e., the program is not aborted); */ + /* DebugBreak is a statement in some toolchains. */ # else # define ABORT(msg) (GC_on_abort(msg), abort()) # endif /* !MSWIN32 */ -- 2.40.0