[PATCH] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm

H.J. Lu hjl.tools@gmail.com
Wed Oct 4 00:43:00 GMT 2017


On 10/3/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> On 10/3/17, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On 10/3/17, Gabriel F. T. Gomes <gabriel@inconstante.eti.br> wrote:
>>> On 03 Oct 2017, Joseph Myers wrote:
>>>
>>>>> +/* 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.
>>>
>>> Thanks.  Pushed with these changes.
>>>
>>>
>>
>> On i686 wit GCC 7, I got
>>
>> test-math-iscanonical.cc: In function ‘void check_type()’:
>> test-math-iscanonical.cc:33:11: error: use of an operand of type
>> ‘bool’ in ‘operator++’ is deprecated [-Werror=deprecated]
>>      errors++;
>>            ^~
>> test-math-iscanonical.cc: In instantiation of ‘void check_type() [with
>> T = float]’:
>> test-math-iscanonical.cc:39:22:   required from here
>> test-math-iscanonical.cc:33:11: error: use of an operand of type
>> ‘bool’ in ‘operator++’ is deprecated [-Werror=deprecated]
>>      errors++;
>>      ~~~~~~^~
>>
>
> I am testing this:
>
> diff --git a/math/test-math-iscanonical.cc b/math/test-math-iscanonical.cc
> index aba68acb4f..8ced7a73b4 100644
> --- a/math/test-math-iscanonical.cc
> +++ b/math/test-math-iscanonical.cc
> @@ -20,7 +20,7 @@
>  #include <math.h>
>  #include <stdio.h>
>
> -static bool errors;
> +static int errors;
>
>  template <class T>
>  static void
>
>

This is what I checked in.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-test-math-iscanonical.cc-Replace-bool-with-int.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171004/2fc44829/attachment.bin>


More information about the Libc-alpha mailing list