This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Provide a C++ version of iszero that does not use __MATH_TG
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gftg at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 25 Aug 2017 15:36:40 +0000
- Subject: Re: [PATCH] Provide a C++ version of iszero that does not use __MATH_TG
- Authentication-results: sourceware.org; auth=none
- References: <20170825011158.26152-1-gftg@linux.vnet.ibm.com>
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