From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id D094B386F463 for ; Mon, 20 Apr 2020 14:15:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D094B386F463 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-137-DtfCvsNUPF-x5fx2_CoyrQ-1; Mon, 20 Apr 2020 10:15:34 -0400 X-MC-Unique: DtfCvsNUPF-x5fx2_CoyrQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C364C107ACC4 for ; Mon, 20 Apr 2020 14:15:33 +0000 (UTC) Received: from blade.nx (ovpn-115-177.ams2.redhat.com [10.36.115.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9001019C4F for ; Mon, 20 Apr 2020 14:15:33 +0000 (UTC) Received: by blade.nx (Postfix, from userid 1000) id CBE10816CCA9; Mon, 20 Apr 2020 15:15:32 +0100 (BST) Date: Mon, 20 Apr 2020 15:15:32 +0100 From: Gary Benson To: gdb-patches@sourceware.org Subject: Re: [OB PATCH] Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c Message-ID: <20200420141531.GA9053@blade.nx> References: <1587391684-8650-1-git-send-email-gbenson@redhat.com> MIME-Version: 1.0 In-Reply-To: Organization: Red Hat UK Ltd, 64 Baker Street, 4th Floor, W1U 7DF, UK. Registered in England and Wales (3798903) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, score=-27.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:15:38 -0000 Simon Marchi wrote: > On 2020-04-20 10:08 a.m., Gary Benson via Gdb-patches wrote: > > Clang fails to compile the above file, with the following error: > > warning: using the result of an assignment as a condition without > > parentheses [-Wparentheses] > >=20 > > This prevents the following testcase from executing: > > gdb.trace/tspeed.exp > > --- > > gdb/testsuite/ChangeLog | 5 +++++ > > gdb/testsuite/gdb.trace/tspeed.c | 2 +- > > 2 files changed, 6 insertions(+), 1 deletion(-) > >=20 > > diff --git a/gdb/testsuite/gdb.trace/tspeed.c b/gdb/testsuite/gdb.trace= /tspeed.c > > index b2c26bb..39a6646 100644 > > --- a/gdb/testsuite/gdb.trace/tspeed.c > > +++ b/gdb/testsuite/gdb.trace/tspeed.c > > @@ -75,7 +75,7 @@ > > =20 > > /* Keep trying the speed test, with more iterations, until > > =09 we get to a reasonable number. */ > > - while (problem =3D trace_speed_test()) > > + while ((problem =3D trace_speed_test())) > > =09{ > > =09 /* If iteration isn't working, give up. */ > > =09 if (iters > max_iters) > > --=20 > > 1.8.3.1 >=20 > For some reason, we don't see you ChangeLog entry in the patch > (although the diffstat shows changes to it), but it looks like: >=20 > +2020-04-20 Gary Benson > + > + * gdb/testsuite/gdb.trace/tspeed.c: Fix compilation error with > + clang. >=20 > The filename should not have the gdb/testsuite part. It's not my day today! Should I commit a fix to the ChangeLog, or should I leave it alone? Thanks, Gary