summaryrefslogtreecommitdiff
path: root/include/complex.h
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2012-01-05 12:05:48 +0000
committerEd Schouten <ed@FreeBSD.org>2012-01-05 12:05:48 +0000
commitf92d9d7d375049753865aa2a50428162f23c4a44 (patch)
tree2c3837421c98d6a8c2bd6fe8421eedd7dc636b64 /include/complex.h
parent5a39f779b2f185895b0d219de337e140cf8ba7a4 (diff)
Notes
Diffstat (limited to 'include/complex.h')
-rw-r--r--include/complex.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/complex.h b/include/complex.h
index 414230472d2b..395983fab5c4 100644
--- a/include/complex.h
+++ b/include/complex.h
@@ -29,11 +29,15 @@
#ifndef _COMPLEX_H
#define _COMPLEX_H
+#include <sys/cdefs.h>
+
#ifdef __GNUC__
#if __STDC_VERSION__ < 199901
#define _Complex __complex__
#endif
-#define _Complex_I 1.0fi
+#define _Complex_I ((float _Complex)1.0i)
+_Static_assert(__generic(_Complex_I, float _Complex, 1, 0),
+ "_Complex_I must be of type float _Complex");
#endif
#define complex _Complex