|
Message-ID: <1416926830.16006.923.camel@eris.loria.fr> Date: Tue, 25 Nov 2014 15:49:39 +0100 From: Jens Gustedt <Jens.Gustedt@...ia.fr> To: musl@...ts.openwall.com Subject: [PATCH 1/4] the CMPLX macros must be usable in initializations of static variables --- include/complex.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/complex.h b/include/complex.h index 13a45c5..3e14e04 100644 --- a/include/complex.h +++ b/include/complex.h @@ -112,8 +112,7 @@ long double creall(long double complex); #define cimagf(x) __CIMAG(x, float) #define cimagl(x) __CIMAG(x, long double) -#define __CMPLX(x, y, t) \ - ((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z) +#define __CMPLX(x, y, t) ((t)(x) + _Complex_I*(t)(y)) #define CMPLX(x, y) __CMPLX(x, y, double) #define CMPLXF(x, y) __CMPLX(x, y, float) -- 1.9.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.