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 + #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