From 88c3fcc7b33120fcbf68e09025479264398d9155 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 1 Jan 2019 16:36:40 +0100 Subject: [PATCH] Force implicit conversion to boolean. This unbreaks the use of assertions within C++ code. --- src/include/assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/assert.h b/src/include/assert.h index 8b77a534..d74340ba 100644 --- a/src/include/assert.h +++ b/src/include/assert.h @@ -54,5 +54,5 @@ static __inline void __assert_enabled(const char *__func, const char *__file, #define assert(expression) __assert_disabled() #else #define assert(expression) \ - __assert_enabled(__func__, __FILE__, __LINE__, expression, #expression) + __assert_enabled(__func__, __FILE__, __LINE__, !!(expression), #expression) #endif