This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 3 Oct 2017 14:54:39 +0000
- Subject: Re: [PATCH] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm
- Authentication-results: sourceware.org; auth=none
- References: <20171003140307.22359-1-gabriel@inconstante.eti.br>
On Tue, 3 Oct 2017, Gabriel F. T. Gomes wrote:
> [BZ #22235]
> * math/Makefile [CXX] (tests): Add test-math-iscanonical.cc.
> (CFLAGS-test-math-iscanonical.cc): New variable.
> * math/test-math-iscanonical.cc: New file.
> * sysdeps/ieee754/ldbl-96/bits/iscanonical.h (iscanonical):
> Provide a C++ implementation based on function overloading,
> rather than using __MATH_TG, which uses C-only builtins.
> * sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h (iscanonical):
> Likewise.
> * sysdeps/powerpc/powerpc64le/Makefile
> (CFLAGS-test-math-iscanonical.cc): New variable.
OK, but note
> +/* In C++ mode, __MATH_TG cannot be used, because it relies on
> + __builtin_types_compatible_p, which is a C-only builtin. On the
> + other hand, overloading provides the means to distinguish between
> + the floating-point types. The overloading resolution will match
> + the correct parameter (regardless of type qualifiers (i.e.: const
> + and volatile). */
(twice in this patch, and once already in math.h) is missing a second
close parenthesis to match the first open parenthesis, and should be
fixed.
--
Joseph S. Myers
joseph@codesourcery.com