about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-08-02 20:16:05 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-08-02 20:16:05 +0000
commit42df8d5921d9ce28f44694ae943efb432b5e9aa7 (patch)
tree26f13b7bb504926987ad82ac279ddd1896b5fd77 /ChangeLog
parentb7f95f493b47abfd8f6320b3492b25a2beaa6aa1 (diff)
downloadglibc-42df8d5921d9ce28f44694ae943efb432b5e9aa7.tar.gz
glibc-42df8d5921d9ce28f44694ae943efb432b5e9aa7.tar.xz
glibc-42df8d5921d9ce28f44694ae943efb432b5e9aa7.zip
Fix tgmath.h for __int128 (bug 21686).
When a tgmath.h macro is passed a double argument and an argument of
type __int128, it generates a call to a long double function (although
the result still gets converted to type double).  __int128 is similar
enough to integer types that it should be handled consistently like
them, so always like double for these macros rather than sometimes
like double and sometimes like long double.  This patch fixes the
logic accordingly and makes gen-tgmath-tests.py generate tests for
__int128.

Tested for x86_64 and x86.

	[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.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog13
1 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2125236df8..a3bc654f65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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