diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-12-17 16:47:34 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-12-17 16:47:34 -0500 |
commit | a9c2294eef0b4d7e7bcf6155ecb46b25703a80eb (patch) | |
tree | ec56817a7721f828815a9cd68f7b449571089d11 /include | |
parent | 4075af4318676ebbe5949eb9cee3fec7008de4d7 (diff) | |
download | musl-a9c2294eef0b4d7e7bcf6155ecb46b25703a80eb.tar.gz musl-a9c2294eef0b4d7e7bcf6155ecb46b25703a80eb.tar.bz2 musl-a9c2294eef0b4d7e7bcf6155ecb46b25703a80eb.tar.xz musl-a9c2294eef0b4d7e7bcf6155ecb46b25703a80eb.zip |
make the definition of _Complex_I explicitly complex
it's unclear whether compilers which provide pure imaginary types
might produce a pure imaginary expression for 1.0fi. using 0.0f+1.0fi
ensures that the result is explicitly complex and makes this obvious
to human readers too.
Diffstat (limited to 'include')
-rw-r--r-- | include/complex.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/complex.h b/include/complex.h index bdddf87b..4d21728e 100644 --- a/include/complex.h +++ b/include/complex.h @@ -7,9 +7,9 @@ extern "C" { #define complex _Complex #ifdef __GNUC__ -#define _Complex_I (__extension__ 1.0fi) +#define _Complex_I (__extension__ (0.0f+1.0fi)) #else -#define _Complex_I 1.0fi +#define _Complex_I (0.0f+1.0fi) #endif #define I _Complex_I |