+2017-08-02 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #21686]
+ * math/tgmath.h (__TGMATH_BINARY_REAL_ONLY): Add arguments before
+ comparing size with that of double.
+ (__TGMATH_BINARY_REAL_STD_ONLY): Likewise.
+ (__TGMATH_BINARY_REAL_RET_ONLY): Likewise.
+ (__TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY): Likewise.
+ (__TGMATH_TERNARY_REAL_ONLY): Likewise.
+ (__TGMATH_BINARY_REAL_IMAG): Likewise.
+ * math/gen-tgmath-tests.py (Type.init_types): Create __int128 and
+ unsigned __int128 types.
+
2017-08-02 Steve Ellcey <sellcey@cavium.com>
* localedata/Makefile (CFLAGS-tst_iswalnum.c, CFLAGS-tst_iswalpha.c
Type.create_type('unsigned long int', integer=True)
Type.create_type('long long int', integer=True)
Type.create_type('unsigned long long int', integer=True)
+ Type.create_type('__int128', integer=True,
+ condition='defined __SIZEOF_INT128__')
+ Type.create_type('unsigned __int128', integer=True,
+ condition='defined __SIZEOF_INT128__')
Type.create_type('enum e', integer=True, complex_ok=False)
Type.create_type('_Bool', integer=True, complex_ok=False)
Type.create_type('bit_field', integer=True, complex_ok=False)
: (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
- (__extension__ (((sizeof (+(Val1)) > sizeof (double) \
- || sizeof (+(Val2)) > sizeof (double)) \
+ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
? __TGMATH_F128 ((Val1) + (Val2), \
(__typeof \
Fct##f (Val1, Val2)))
# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
- (__extension__ (((sizeof (+(Val1)) > sizeof (double) \
- || sizeof (+(Val2)) > sizeof (double)) \
+ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
? (__typeof ((__tgmath_real_type (Val1)) 0 \
+ (__tgmath_real_type (Val2)) 0)) \
Fct##f (Val1, Val2)))
# define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \
- (__extension__ (((sizeof (+(Val1)) > sizeof (double) \
- || sizeof (+(Val2)) > sizeof (double)) \
+ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
? __TGMATH_F128 ((Val1) + (Val2), Fct, (Val1, Val2)) \
__tgml(Fct) (Val1, Val2) \
: Fct##f (Val1, Val2)))
# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
- (__extension__ (((sizeof (+(Val1)) > sizeof (double) \
- || sizeof (+(Val2)) > sizeof (double)) \
+ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
? __TGMATH_F128 ((Val1) + (Val2), \
(__typeof \
Fct##f (Val1, Val2, Val3)))
# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
- (__extension__ (((sizeof (+(Val1)) > sizeof (double) \
- || sizeof (+(Val2)) > sizeof (double) \
- || sizeof (+(Val3)) > sizeof (double)) \
+ (__extension__ ((sizeof ((Val1) + (Val2) + (Val3)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2) + (Val3)) \
== 8) \
? __TGMATH_F128 ((Val1) + (Val2) + (Val3), \
/* XXX This definition has to be changed as soon as the compiler understands
the imaginary keyword. */
# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
- (__extension__ (((sizeof (+__real__ (Val1)) > sizeof (double) \
- || sizeof (+__real__ (Val2)) > sizeof (double)) \
+ (__extension__ ((sizeof (__real__ (Val1) \
+ + __real__ (Val2)) > sizeof (double) \
&& __builtin_classify_type (__real__ (Val1) \
+ __real__ (Val2)) == 8) \
? __TGMATH_CF128 ((Val1) + (Val2), \