diff options
author | Haru <haru@dotalux.com> | 2018-08-25 16:50:52 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-08-25 17:52:21 +0200 |
commit | 919f004106a705947a52ead1b6b23238cbe10218 (patch) | |
tree | 40040c86649ae45319c31f34db18692d955f8f03 /src | |
parent | 234189f34e5f055c82654b8cd35330822e8aa4d7 (diff) | |
download | hercules-919f004106a705947a52ead1b6b23238cbe10218.tar.gz hercules-919f004106a705947a52ead1b6b23238cbe10218.tar.bz2 hercules-919f004106a705947a52ead1b6b23238cbe10218.tar.xz hercules-919f004106a705947a52ead1b6b23238cbe10218.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/common/cbasetypes.h | 6 |
1 files changed, 0 insertions, 6 deletions
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) |