From patchwork Wed Oct 4 00:43:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 23318 Received: (qmail 40889 invoked by alias); 4 Oct 2017 00:43:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 40259 invoked by uid 89); 4 Oct 2017 00:43:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=UTF-8, UTF8 X-HELO: mail-oi0-f65.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=z9x2idlYkD5m9dKlv48YppMCGcFH5R2MIUX/xYNEbXc=; b=NGdGpdTgLUwdX2CN3Znz3ph/rl2bCHabtkBfCYtWgJcWsh1gaw+4ad34+3ePnbubxn tzzC3AmpsqH+pZdYpxSxHEhtToRG6XGHl5UK61bZkRZmfVfWZz74XcTR5bvAszafJvJ4 jXlLR20Vwf5lPJh+Plz+ZleMXyfx9lElAd+lub1XLmQeFErV6pd8DnEhHCi15XvoafkJ 1yxKSYvEwaCQV9/wBK29Akvp+GdnXu3nuOU5gqnD8hDqD/qAq7rrOdkmEOB/+YjBpjcc QWhpOhuDFRnk5bMO+1S75pyFqqtcNcGqtJHphz3e4kU8dZMtdXtU/kIk9lLZ/io5IXOb eq6Q== X-Gm-Message-State: AMCzsaW8z2GV+StAgFTHPpCsyAyyHn2p5la3pZVK7x1k0GRKnDVMqP+H cklUKiH7TFJqOMguFrkFDqqfD3BZk7CKyBWJD/M= X-Google-Smtp-Source: AOwi7QCHXWyENh5dga85VUzgsxX6MRa5qPwxj/E7bIT0EdRu78w0PSu6Cfn4cvlU1ZGDm8eWNd53FomZG9Ro7hNY4Io= X-Received: by 10.157.33.246 with SMTP id s109mr12759754otb.50.1507077821686; Tue, 03 Oct 2017 17:43:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20171003140307.22359-1-gabriel@inconstante.eti.br> <20171003161028.116fd41a@keller.br.ibm.com> From: "H.J. Lu" Date: Tue, 3 Oct 2017 17:43:40 -0700 Message-ID: Subject: Re: [PATCH] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm To: "Gabriel F. T. Gomes" Cc: Joseph Myers , libc-alpha@sourceware.org On 10/3/17, H.J. Lu wrote: > On 10/3/17, H.J. Lu wrote: >> On 10/3/17, Gabriel F. T. Gomes 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 > #include > > -static bool errors; > +static int errors; > > template > static void > > This is what I checked in. From 117353f294b215a164905ab6d412f3bf8d77ae5a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 3 Oct 2017 17:11:55 -0700 Subject: [PATCH] test-math-iscanonical.cc: Replace bool with int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix GCC 7 compilation error: 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++; ^~ * math/test-math-iscanonical.cc (error): Replace bool with int. --- math/test-math-iscanonical.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 #include -static bool errors; +static int errors; template static void -- 2.13.6