summaryrefslogtreecommitdiffstats
path: root/include/complex.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-01-17 20:22:10 +0000
committered <ed@FreeBSD.org>2012-01-17 20:22:10 +0000
commit55f99993c3e72dbb60d426ffd874ed7544625b5d (patch)
tree28b98d379290152708011177d8512ac75ee2769c /include/complex.h
parent99a08914e748090d056d843d0359a514d8454b63 (diff)
downloadFreeBSD-src-55f99993c3e72dbb60d426ffd874ed7544625b5d.zip
FreeBSD-src-55f99993c3e72dbb60d426ffd874ed7544625b5d.tar.gz
Only use the static assertion when __generic is available.
Reported by: tijl
Diffstat (limited to 'include/complex.h')
-rw-r--r--include/complex.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/complex.h b/include/complex.h
index 33c7940..0702541 100644
--- a/include/complex.h
+++ b/include/complex.h
@@ -36,6 +36,9 @@
#define _Complex __complex__
#endif
#define _Complex_I ((float _Complex)1.0i)
+#endif
+
+#ifdef __generic
_Static_assert(__generic(_Complex_I, float _Complex, 1, 0),
"_Complex_I must be of type float _Complex");
#endif
OpenPOWER on IntegriCloud