summaryrefslogtreecommitdiffstats
path: root/include/tgmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tgmath.h')
-rw-r--r--include/tgmath.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/tgmath.h b/include/tgmath.h
index 9302302..7f4de6f 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -60,7 +60,8 @@
* compilers use an inefficient yet reliable version.
*/
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
+ __has_extension(c_generic_selections)
#define __tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf) \
_Generic(x, \
long double _Complex: cfnl, \
OpenPOWER on IntegriCloud