From 4d62cbde3a5ac8a70c8d6abc1d5441a086cec348 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Tue, 31 May 2022 22:06:17 -0700 Subject: [PATCH] Address feedback --- src/alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index 5a89831a..c0940088 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -803,11 +803,11 @@ static bool mi_try_new_handler(bool nothrow) { if (h==NULL) { _mi_error_message(ENOMEM, "out of memory in 'new'"); if (!nothrow) { -#ifdef __EXCEPTIONS - throw std::bad_alloc(); -#else - abort(); -#endif + #if defined(__GNUC__) && !defined(__EXCEPTIONS) + abort(); + #else + throw std::bad_alloc(); + #endif } return false; }