diff options
author | imp <imp@FreeBSD.org> | 2014-10-10 00:35:13 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-10-10 00:35:13 +0000 |
commit | f7d13532c956ff0178ceb8cfb60505a36a8abce0 (patch) | |
tree | 4878059cf8599559cf0dfc8d8204d92a46c24dbb /sys/sys/cdefs.h | |
parent | a2b4dd0675a6c16c348638791e6e1a47cc047997 (diff) | |
download | FreeBSD-src-f7d13532c956ff0178ceb8cfb60505a36a8abce0.zip FreeBSD-src-f7d13532c956ff0178ceb8cfb60505a36a8abce0.tar.gz |
For gcc 4.6 and newer, _Static_assert is a keyword, so don't try to
redefine it. It does what we want, and is always available unlike
other alternatives.
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r-- | sys/sys/cdefs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 328ce7c..a0cc52f 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -288,6 +288,8 @@ #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) +#elif __GNUC_PREREQ__(4,6) +/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) |