[PATCH] Provide a C++ version of iszero that does not use __MATH_TG

Joseph Myers joseph@codesourcery.com
Fri Aug 25 15:36:00 GMT 2017


On Thu, 24 Aug 2017, Gabriel F. T. Gomes wrote:

> When signaling nans are enabled (with -fsignaling-nans), the C++ version
> of iszero uses the fpclassify macro, which is defined with __MATH_TG.
> However, when support for float128 is available, __MATH_TG uses the
> builtin __builtin_types_compatible_p, which is only available in C mode.
> 
> This patch refactors the C++ version of iszero so that it uses function
> overloading to select between the floating-point types, instead of
> relying on fpclassify and __MATH_TG.
> 
> Tested for powerpc64le, s390x, and x86_64.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list