diff options
author | ed <ed@FreeBSD.org> | 2012-01-17 20:22:10 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-01-17 20:22:10 +0000 |
commit | 55f99993c3e72dbb60d426ffd874ed7544625b5d (patch) | |
tree | 28b98d379290152708011177d8512ac75ee2769c /include | |
parent | 99a08914e748090d056d843d0359a514d8454b63 (diff) | |
download | FreeBSD-src-55f99993c3e72dbb60d426ffd874ed7544625b5d.zip FreeBSD-src-55f99993c3e72dbb60d426ffd874ed7544625b5d.tar.gz |
Only use the static assertion when __generic is available.
Reported by: tijl
Diffstat (limited to 'include')
-rw-r--r-- | include/complex.h | 3 |
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 |