diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sysdeps/generic/math_private.h | 15 |
2 files changed, 16 insertions, 6 deletions
@@ -1,5 +1,12 @@ 2017-11-24 Joseph Myers <joseph@codesourcery.com> + * sysdeps/generic/math_private.h (min_of_type_f): Make into a + function-like macro. + (min_of_type_): Likewise. + (min_of_type_l): Likewise. + (min_of_type_f128): Likewise. + (min_of_type): Pass () as last argument of __MATH_TG. + * stdlib/tst-strtod-round-skeleton.c (__STDC_WANT_IEC_60559_TYPES_EXT__): Define before including headers. diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index 80c7c92..f29898c 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -298,12 +298,15 @@ extern void __docos (double __x, double __dx, double __v[]); #define fabs_tg(x) __MATH_TG ((x), (__typeof (x)) __builtin_fabs, (x)) -#define min_of_type_f FLT_MIN -#define min_of_type_ DBL_MIN -#define min_of_type_l LDBL_MIN -#define min_of_type_f128 FLT128_MIN - -#define min_of_type(x) __MATH_TG ((x), (__typeof (x)) min_of_type_, ) +/* These must be function-like macros because some __MATH_TG + implementations macro-expand the function-name argument before + concatenating a suffix to it. */ +#define min_of_type_f() FLT_MIN +#define min_of_type_() DBL_MIN +#define min_of_type_l() LDBL_MIN +#define min_of_type_f128() FLT128_MIN + +#define min_of_type(x) __MATH_TG ((x), (__typeof (x)) min_of_type_, ()) /* If X (which is not a NaN) is subnormal, force an underflow exception. */ |