From patchwork Wed Nov 29 10:48:43 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: 24590 Received: (qmail 85488 invoked by alias); 29 Nov 2017 10:48:48 -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 85477 invoked by uid 89); 29 Nov 2017 10:48:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_LOTSOFHASH, KAM_SHORT, KB_WAM_FROM_NAME_SINGLEWORD, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*MI:004b, H*M:004b X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.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 10:48:46 +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 414431529 for ; Wed, 29 Nov 2017 02:48:45 -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 E25593F318 for ; Wed, 29 Nov 2017 02:48:44 -0800 (PST) To: GDB Patches From: Thomas Preudhomme Subject: [PATCH, gdb/testsuite] Fix wrong return type in tests Message-ID: Date: Wed, 29 Nov 2017 10:48:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, The following tests are marked untested with latest GCC due to a warning being emitted for a mismatch between their return type and what the lack of return statement: * gdb.cp/breakpoint.exp * gdb.cp/psymtab-parameter.exp * gdb.cp/shadow.exp This patch fix the return type to match the function definitions. ChangeLog entries is as follows: *** gdb/testsuite/ChangeLog *** 2017-11-29 Thomas Preud'homme * gdb.cp/breakpoint.cc (bar): Set return type to void. * gdb.cp/psymtab-parameter.cc (func): Likewise. * gdb.cp/psymtab-parameter.exp: Update comment regarding prototype of func (). * gdb.cp/shadow.cc (B.func): Return 0. Testing: Tests PASS on arm-none-eabi with this fix but are marked UNTESTED without. Committed as obvious. Best regards, Thomas diff --git a/gdb/testsuite/gdb.cp/breakpoint.cc b/gdb/testsuite/gdb.cp/breakpoint.cc index fc9b9d9f3e55813ac549ec06d4bdb393e1a93809..1feff44cd38cdc385abd2c4ea3c9dcf8b57c4861 100644 --- a/gdb/testsuite/gdb.cp/breakpoint.cc +++ b/gdb/testsuite/gdb.cp/breakpoint.cc @@ -28,7 +28,7 @@ public: return 1; // conditional breakpoint in method } - int bar () + void bar () { for (int i = 0; i < 1; ++i) { diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.cc b/gdb/testsuite/gdb.cp/psymtab-parameter.cc index 0990430c128413ecc21bcf65ebf58a1899f535fa..9f63fefcaeb800f7444fe74225514d3330036e5b 100644 --- a/gdb/testsuite/gdb.cp/psymtab-parameter.cc +++ b/gdb/testsuite/gdb.cp/psymtab-parameter.cc @@ -16,7 +16,7 @@ along with this program. If not, see . */ template -long +void func () { } diff --git a/gdb/testsuite/gdb.cp/psymtab-parameter.exp b/gdb/testsuite/gdb.cp/psymtab-parameter.exp index 3d78de91f4b3752d754bd776ae3532700a308a40..5c4b6ac71927fe9030bd9ce66111761425ab433b 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 `long func()' ELF symbol before, not the DWARF +# GDB has shown only the `void func()' ELF symbol before, not the DWARF # symbol gdb_test "complete p 'func(" "p 'func\\(\\)" diff --git a/gdb/testsuite/gdb.cp/shadow.cc b/gdb/testsuite/gdb.cp/shadow.cc index 0520b2aeb8b6afecd7091cac3e295bec99c485b1..4c9fb12a7bbe95a89c3b7df2cb2782fabeec462a 100644 --- a/gdb/testsuite/gdb.cp/shadow.cc +++ b/gdb/testsuite/gdb.cp/shadow.cc @@ -36,6 +36,7 @@ public: } } } + return 0; } };