aboutsummaryrefslogtreecommitdiffstats
path: root/include/tgmath.h
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2014-09-03 09:35:38 +0000
committerEd Schouten <ed@FreeBSD.org>2014-09-03 09:35:38 +0000
commit62b7f85d47499c4f4428771454aab25eaba308a4 (patch)
tree129180b85ca5a890a049968a537a008b2d555cf1 /include/tgmath.h
parent624bf9e1348ad99a6efdca9f150b40b51efaccd2 (diff)
downloadsrc-62b7f85d47499c4f4428771454aab25eaba308a4.tar.gz
src-62b7f85d47499c4f4428771454aab25eaba308a4.zip
Leave the C11 keywords alone when we have a recent version of GCC.
As GCC also gained support for the C11 keywords over time, we can patch up <sys/cdefs.h> to not define these anymore. This has the advantage that error messages for static assertions are printed natively and that _Alignas() will work with even a type outside of C11 mode. All C11 keywords are supported with GCC 4.7 and higher, with the exception of _Thread_local and _Generic. These are only supported as of GCC 4.9.
Notes
Notes: svn path=/head/; revision=271012
Diffstat (limited to 'include/tgmath.h')
-rw-r--r--include/tgmath.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tgmath.h b/include/tgmath.h
index 7f4de6f3fa6e..488575f0fbfa 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -61,7 +61,7 @@
*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
- __has_extension(c_generic_selections)
+ __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9)
#define __tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf) \
_Generic(x, \
long double _Complex: cfnl, \