From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69338 invoked by alias); 27 Feb 2019 20:01:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 69089 invoked by uid 89); 27 Feb 2019 20:00:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=disappeared, urgent, investigate X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Feb 2019 20:00:40 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 21D50807CE for ; Wed, 27 Feb 2019 15:00:38 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id pGyKD4AGp4S5; Wed, 27 Feb 2019 15:00:37 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id C19E1807AD; Wed, 27 Feb 2019 15:00:37 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com C19E1807AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1551297637; bh=kZtmbwK9y0tCdpOEy5hW6yI3O0BoxdzPrUeHj1o3O2k=; h=From:To:Date:Message-Id:MIME-Version; b=N1cecXXjL5Ai1qiI7C2aYbbJSoF8Z0oigd33nTKcwmsvgeVS8FK1Cn+t7ZFzCrEEt rO60XMiiIJiJUlrrS26nHDAbUIJdgMgyHH6W/RsMUa2LDOyxJeJB06Gig6Z+C73Rz+ St9nn1YOVolN5TovKs5xXlYQjPlS0gG7WEpbLPEZZMwgHkGQHgfkGUuV30DxTBiLz3 56uBt3JiY9QRVnFkKyKEU77tEhOrOvSQZTa+kRG/OyOL3DP+uuiys4yCdBT/IdG5EO 04i2timzs3vKuzPMoLK9N6cV9hHwkCIAq6xnUDJbSbOrvC9TigQk2FDTHdxi1rsDPQ KAqXoU75OBQTg== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id L_R8klL4VBRd; Wed, 27 Feb 2019 15:00:37 -0500 (EST) Received: from smarchi-efficios.internal.efficios.com (192-222-157-41.qc.cable.ebox.net [192.222.157.41]) by mail.efficios.com (Postfix) with ESMTPSA id 9EE69807A5; Wed, 27 Feb 2019 15:00:37 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 00/13] Splut rank_one_type in smaller functions Date: Wed, 27 Feb 2019 20:01:00 -0000 Message-Id: <20190227200028.27360-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-02/txt/msg00502.txt.bz2 The initial reason for this series is to investigate the following error I get when building on Ubuntu 18.04, using the default compiler (gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0). CXX gdbtypes.o /home/smarchi/src/binutils-gdb/gdb/gdbtypes.c: In function =E2=80=98rank ra= nk_one_type(type*, type*, value*)=E2=80=99: /home/smarchi/src/binutils-gdb/gdb/gdbtypes.c:4259:1: error: control reache= s end of non-void function [-Werror=3Dreturn-type] } ^ I wanted to see if this was a false positive specific to this gcc version (I assume it is, since I haven't seen anybody report this error before). To do that, I started to manually verify each execution path of that function and see if execution can really reach the end. However, due to the size and complexity of the switch in that function, it was not very practical. So I started to split that switch in smaller functions (one per type code of PARM). At some point, the error disappeared. It turns out that it's the last patch that makes the error disappear. But still, I think this series is useful, since it gets rid of a false positive error and makes the code a little bit more readable at the same time. Copyright assignment status: I am currently not covered by a copyright assignment, so I will push this once it is sorted out. This series might now actually be significant w.r.t. copyright, since it is just moving some code around, but in any case it is not really urgent to merge it either. I ran this series through the buildbot, it reported no new failure. Simon Marchi (13): Split rank_one_type_parm_ptr from rank_one_type Split rank_one_type_parm_array from rank_one_type Split rank_one_type_parm_func from rank_one_type Split rank_one_type_parm_int from rank_one_type Split rank_one_type_parm_enum from rank_one_type Split rank_one_type_parm_char from rank_one_type Split rank_one_type_parm_range from rank_one_type Split rank_one_type_parm_bool from rank_one_type Split rank_one_type_parm_float from rank_one_type Split rank_one_type_parm_complex from rank_one_type Split rank_one_type_parm_struct from rank_one_type Split rank_one_type_parm_set from rank_one_type Remove unnecessary cases from rank_one_type's switch gdb/gdbtypes.c | 742 ++++++++++++++++++++++++++----------------------- 1 file changed, 400 insertions(+), 342 deletions(-) --=20 2.21.0