From: Rich Felker Date: Wed, 17 Dec 2014 21:44:43 +0000 (-0500) Subject: make the result of the cimag macro a non-lvalue X-Git-Tag: v1.1.6~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4075af4318676ebbe5949eb9cee3fec7008de4d7;p=oweals%2Fmusl.git 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. --- 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))