diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-12-17 16:44:43 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-12-17 16:45:42 -0500 |
commit | 4075af4318676ebbe5949eb9cee3fec7008de4d7 (patch) | |
tree | 5f329d142902b0ce7f5e985c17b0c7f7310de20d /include/complex.h | |
parent | 5ff2a118c64224789b7286830912425e58831b2b (diff) | |
download | musl-4075af4318676ebbe5949eb9cee3fec7008de4d7.tar.gz musl-4075af4318676ebbe5949eb9cee3fec7008de4d7.tar.bz2 musl-4075af4318676ebbe5949eb9cee3fec7008de4d7.tar.xz musl-4075af4318676ebbe5949eb9cee3fec7008de4d7.zip |
make the result of the cimag macro a non-lvalue
this change is not necessary but helps diagnose invalid code. based on
patch by Jens Gustedt.
Diffstat (limited to 'include/complex.h')
-rw-r--r-- | include/complex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/complex.h b/include/complex.h index 23bab7d5..bdddf87b 100644 --- a/include/complex.h +++ b/include/complex.h @@ -103,7 +103,7 @@ long double creall(long double complex); #ifndef __cplusplus #define __CIMAG(x, t) \ - ((union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1]) + (+(union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1]) #define creal(x) ((double)(x)) #define crealf(x) ((float)(x)) |