From patchwork Wed Nov 29 13:42:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preud'homme X-Patchwork-Id: 24597 Received: (qmail 15535 invoked by alias); 29 Nov 2017 13:43:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15522 invoked by uid 89); 29 Nov 2017 13:43:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, KB_WAM_FROM_NAME_SINGLEWORD, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Nov 2017 13:42:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6A7B31596; Wed, 29 Nov 2017 05:42:57 -0800 (PST) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E85693F246; Wed, 29 Nov 2017 05:42:56 -0800 (PST) Subject: Re: [PATCH, gdb/testsuite] Fix wrong return type in tests To: Pedro Alves , GDB Patches References: <964a7f20-21f0-3e7f-a46a-6ef34cef046c@redhat.com> <0bde66e5-b4fe-7d63-66d7-4882855b03aa@foss.arm.com> <222801b2-deb4-3855-af56-7417d134c547@redhat.com> From: Thomas Preudhomme Message-ID: <55f5e146-deff-f1f7-cb14-10a180121907@foss.arm.com> Date: Wed, 29 Nov 2017 13:42:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <222801b2-deb4-3855-af56-7417d134c547@redhat.com> X-IsSubscribed: yes Done (see attached patch). *** gdb/testsuite/ChangeLog *** 2017-11-29 Thomas Preud'homme * gdb.cp/psymtab-parameter.cc (func): Change return type back to long. Return 0 as a long. * gdb.cp/psymtab-parameter.exp: Change func's return type back to long. Testing: Testcase still PASSes with the change. Best regards, Thomas On 29/11/17 12:06, Pedro Alves wrote: > On 11/29/2017 11:59 AM, Thomas Preudhomme wrote: >> My apologize, I thought it couldn't be significant since it was not >> returning anything. I didn't think about the impact on the prototype >> itself. > > No worries. It was easy to miss. > > How about making it return 0 instead then? > > Yes please, go ahead and push such a fix in. > > Thanks, > Pedro Alves > diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.cc b/gdb/testsuite/gdb.cp/psymtab-parameter.cc index 9f63fefcaeb800f7444fe74225514d3330036e5b..63038f03237b64ce4bff88e42fee7f836eca3249 100644 --- a/gdb/testsuite/gdb.cp/psymtab-parameter.cc +++ b/gdb/testsuite/gdb.cp/psymtab-parameter.cc @@ -16,9 +16,10 @@ along with this program. If not, see . */ template -void +long func () { + return 0L; } void diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp index 5c4b6ac71927fe9030bd9ce66111761425ab433b..3d78de91f4b3752d754bd776ae3532700a308a40 100644 --- a/gdb/testsuite/gdb.cp/psymtab-parameter.exp +++ b/gdb/testsuite/gdb.cp/psymtab-parameter.exp @@ -31,6 +31,6 @@ gdb_test_no_output "set language c++" # XFAIL than FAIL here. For example -readnow breaks it. gdb_test_no_output "maintenance info symtabs" -# GDB has shown only the `void func()' ELF symbol before, not the DWARF +# GDB has shown only the `long func()' ELF symbol before, not the DWARF # symbol gdb_test "complete p 'func(" "p 'func\\(\\)"