mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
include: Implement C_ASSERT() using the C11 _Static_assert() if available.
This commit is contained in:
parent
298ffd8f80
commit
820a9d0d6c
|
@ -417,7 +417,11 @@ extern "C" {
|
|||
|
||||
/* Compile time assertion */
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
#define C_ASSERT(e) _Static_assert(e, #e)
|
||||
#else
|
||||
#define C_ASSERT(e) extern void __C_ASSERT__(int [(e)?1:-1])
|
||||
#endif
|
||||
|
||||
/* Eliminate Microsoft C/C++ compiler warning 4715 */
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200)
|
||||
|
|
Loading…
Reference in a new issue