]> git.ipfire.org Git - thirdparty/glibc.git/commit - math/test-tgmath.c
Fix tgmath.h totalorder, totalordermag return type (bug 21687).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 28 Jun 2017 16:31:10 +0000 (16:31 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 28 Jun 2017 16:31:10 +0000 (16:31 +0000)
commitd12a22c5d351cd1cc125a6345a949dfbc20f6f91
treefb95acef62127f7ced4626637f49a141ea4f82de
parentcfa44345234e161cb59987ed70e04719ba155867
Fix tgmath.h totalorder, totalordermag return type (bug 21687).

The tgmath.h totalorder and totalordermag macros wrongly return a
floating-point type.  They should return int, like the underlying
functions.  This patch fixes them accordingly, updating tests
including enabling tests of those functions from gen-tgmath-tests.py.

Tested for x86_64.

[BZ #21687]
* math/tgmath.h (__TGMATH_BINARY_REAL_RET_ONLY): New macro.
(totalorder): Use it.
(totalordermag): Likewise.
* math/gen-tgmath-tests.py (Tests.add_all_tests): Enable tests of
totalorder and totalordermag.
* math/test-tgmath.c (F(compile_test)): Do not call totalorder or
totalordermag in arguments of calls to those functions.
(NCALLS): Change to 134.
ChangeLog
math/gen-tgmath-tests.py
math/test-tgmath.c
math/tgmath.h