From 0d6801b130dfba8f73f07c05bc02b2dc787270fd Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Tue, 14 Jan 2020 07:41:58 +0100 Subject: [PATCH] C11, section 7.2: The macro static_assert expands to _Static_assert. This macro was missing on Windows --- win32/include/assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/include/assert.h b/win32/include/assert.h index 466d4571..b15bb638 100644 --- a/win32/include/assert.h +++ b/win32/include/assert.h @@ -54,4 +54,9 @@ extern void __cdecl _assert(const char *, const char *, unsigned); #endif +#if (__STDC_VERSION__ >= 201112L) && !defined(static_assert) +/* C11, section 7.2: The macro static_assert expands to _Static_assert. */ +#define static_assert(exp, str) _Static_assert(exp, str) +#endif + #endif