From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6621 Path: news.gmane.org!not-for-mail From: Jens Gustedt Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH 1/4] the CMPLX macros must be usable in initializations of static variables Date: Tue, 25 Nov 2014 15:49:39 +0100 Message-ID: <1416926830.16006.923.camel@eris.loria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1416927004 1269 80.91.229.3 (25 Nov 2014 14:50:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 14:50:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6634-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 25 15:49:52 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XtHRA-00055N-2Y for gllmg-musl@m.gmane.org; Tue, 25 Nov 2014 15:49:52 +0100 Original-Received: (qmail 1778 invoked by uid 550); 25 Nov 2014 14:49:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1768 invoked from network); 25 Nov 2014 14:49:50 -0000 X-IronPort-AV: E=Sophos;i="5.07,455,1413237600"; d="scan'208";a="109493317" Resent-From: Jens Gustedt Resent-To: musl@lists.openwall.com X-Mailer: Evolution 3.4.4-3 Xref: news.gmane.org gmane.linux.lib.musl.general:6621 Archived-At: --- 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