]> git.ipfire.org Git - thirdparty/glibc.git/commit
Simplify tgmath.h for integer return types.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 28 Jun 2017 16:19:47 +0000 (16:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 28 Jun 2017 16:19:47 +0000 (16:19 +0000)
commitcfa44345234e161cb59987ed70e04719ba155867
treec7d4036635f771b556821b48edd2d800cf1cdb8b
parent51737193a9810ceb1c516a2a71444fa70bcf8500
Simplify tgmath.h for integer return types.

The tgmath.h macros for function with integer return types generate
unnecessary casts to the return type.  Since in those cases the return
type does not depend on the argument type, all the cases in the
conditional expressions already have the right type, and no casts are
needed; this patch removes them.

Tested for x86_64.

* math/tgmath.h (__TGMATH_UNARY_REAL_RET_ONLY): Do not take or
cast to return type argument.
(__TGMATH_TERNARY_FIRST_REAL_RET_ONLY): Likewise.
(lrint): Update call to __TGMATH_UNARY_REAL_RET_ONLY.
(llrint): Likewise.
(lround): Likewise.
(llround): Likewise.
(ilogb): Likewise.
(llogb): Likewise.
(fromfp): Update call to __TGMATH_TERNARY_FIRST_REAL_RET_ONLY.
(ufromfp): Likewise.
(fromfpx): Likewise.
(ufromfpx): Likewise.
ChangeLog
math/tgmath.h