From 4075af4318676ebbe5949eb9cee3fec7008de4d7 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 17 Dec 2014 16:44:43 -0500 Subject: 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. --- include/complex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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)) -- cgit v1.2.3-70-g09d2