Add C11's static_assert feature. git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5279 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/crt/assert.h b/mingw-w64-headers/crt/assert.h index f001c68..2fd4d9c 100644 --- a/mingw-w64-headers/crt/assert.h +++ b/mingw-w64-headers/crt/assert.h
@@ -53,6 +53,14 @@ #endif /* !defined (__ASSERT_H_) */ +#if (defined _ISOC11_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) \ + && !defined (__cplusplus) +/* Static assertion. Requires support in the compiler. */ +#undef static_assert +#define static_assert _Static_assert +#endif + #ifdef NDEBUG #define assert(_Expression) ((void)0) #else /* !defined (NDEBUG) */