summaryrefslogtreecommitdiff
path: root/src/complex
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex')
-rw-r--r--src/complex/_Imaginary_I.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/complex/_Imaginary_I.c b/src/complex/_Imaginary_I.c
index 9357dc4f..052ecfc5 100644
--- a/src/complex/_Imaginary_I.c
+++ b/src/complex/_Imaginary_I.c
@@ -1,10 +1,15 @@
#include <complex.h>
#ifdef __STDC_IEC_559_COMPLEX__
-#define _Imaginary_I (const float _Imaginary)1 /* TODO: imaginary unit */
+#define _Imaginary_I \
+ (((union { \
+ float _Imaginary __i; \
+ float __f; \
+ }){ .__f = 1.0 }).__i)
#endif
/* This should only be defined if imaginary types are supported. */
+
/*
STDC(199901)
*/