about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--math/libm-test.inc6
-rw-r--r--math/test-double.h1
-rw-r--r--math/test-float.h1
-rw-r--r--math/test-ldouble.h1
5 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1feefafa5a..52cd9f3977 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-10-28  Joseph Myers  <joseph@codesourcery.com>
 
+	* math/libm-test.inc (BUILD_COMPLEX): Remove macro.
+	* math/test-double.h (BUILD_COMPLEX): New macro.
+	* math/test-float.h (BUILD_COMPLEX): Likewise.
+	* math/test-ldouble.h (BUILD_COMPLEX): Likewise.
+
 	* math/libm-test.inc (min_subnorm_value): Use LDBL_TRUE_MIN,
 	DBL_TRUE_MIN and FLT_TRUE_MIN instead of __LDBL_DENORM_MIN__,
 	__DBL_DENORM_MIN__ and __FLT_DENORM_MIN__.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 631b205503..17edcfaa05 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -328,12 +328,6 @@ static FLOAT prev_max_error, prev_real_max_error, prev_imag_max_error;
 
 static FLOAT max_valid_error;
 
-#define BUILD_COMPLEX(real, imag) \
-  ({ __complex__ FLOAT __retval;					      \
-     __real__ __retval = (real);					      \
-     __imag__ __retval = (imag);					      \
-     __retval; })
-
 #define MANT_DIG CHOOSE ((LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1),  \
 			 (LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1))
 #define MIN_EXP CHOOSE ((LDBL_MIN_EXP-1), (DBL_MIN_EXP-1), (FLT_MIN_EXP-1),	\
diff --git a/math/test-double.h b/math/test-double.h
index 3f2c0082a2..0038acf89b 100644
--- a/math/test-double.h
+++ b/math/test-double.h
@@ -22,3 +22,4 @@
 #define PRINTF_XEXPR "a"
 #define PRINTF_NEXPR "f"
 #define TEST_DOUBLE 1
+#define BUILD_COMPLEX(real, imag) (CMPLX ((real), (imag)))
diff --git a/math/test-float.h b/math/test-float.h
index 7b00cb1216..8bdba5544d 100644
--- a/math/test-float.h
+++ b/math/test-float.h
@@ -22,3 +22,4 @@
 #define PRINTF_XEXPR "a"
 #define PRINTF_NEXPR "f"
 #define TEST_FLOAT 1
+#define BUILD_COMPLEX(real, imag) (CMPLXF ((real), (imag)))
diff --git a/math/test-ldouble.h b/math/test-ldouble.h
index e42b2bd2f2..4f0858c4cb 100644
--- a/math/test-ldouble.h
+++ b/math/test-ldouble.h
@@ -22,3 +22,4 @@
 #define PRINTF_XEXPR "La"
 #define PRINTF_NEXPR "Lf"
 #define TEST_LDOUBLE 1
+#define BUILD_COMPLEX(real, imag) (CMPLXL ((real), (imag)))