From 919f004106a705947a52ead1b6b23238cbe10218 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 25 Aug 2018 16:50:52 +0200 Subject: Change language specification to c11 in the autoconf builds Fixes an issue with certain glibc versions using the emulated `_Static_assert` (allowing only one assertion per scope) despite the compiler having built-in support for the c11 version. Fixes builds in Debian stretch and other distributions. Signed-off-by: Haru --- src/common/cbasetypes.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/common') diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 3fc41bb23..89f7f8588 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -460,12 +460,6 @@ typedef char bool; #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L // C11 version #define STATIC_ASSERT(ex, msg) _Static_assert(ex, msg) -#elif __has_feature(c_static_assert) -// Clang support (as per http://clang.llvm.org/docs/LanguageExtensions.html) -#define STATIC_ASSERT(ex, msg) _Static_assert(ex, msg) -#elif defined(__GNUC__) && GCC_VERSION >= 40700 -// GCC >= 4.7 is known to support it -#define STATIC_ASSERT(ex, msg) _Static_assert(ex, msg) #elif defined(_MSC_VER) // MSVC doesn't support it, but it accepts the C++ style version #define STATIC_ASSERT(ex, msg) static_assert(ex, msg) -- cgit v1.2.3-60-g2f50