From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id D75B5385800A; Tue, 26 Oct 2021 09:30:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D75B5385800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: iRzaWGalMNVv5QYr4G5m+Kiex9MSyM+FfQK0aUaP9PRm1K+iCEtAJC7+gy96jCPbR0k5pVe3GG EYxdU/XKELAEpJAEuvNiSi7gwWxHQolqazlXyG4UgoNu5EYmttU7Ofve0autc1sCBKooZrHbFS cso5A953PLkTCw0vEKNZ5CvDAsFPeTn3BqXCoqqTOYVyqGwtZI+7f8VoKiQ7/19XbBXWsV9YsM V4cz93h9r92MQeBdIpJH5ZM/1p9gx8rVVhH/ZkawYOH6RRylUWFKjs7MxQ15213xOhU0s5nA/O 3B8JLhWJ3cSxLedh0DP0uqI9 X-IronPort-AV: E=Sophos;i="5.87,182,1631606400"; d="scan'208";a="67628927" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Oct 2021 01:30:51 -0800 IronPort-SDR: GL3ZEX2zruEFHQG6l88AsM1xSCVC568SMt6cXYFIV5LyrC1QwU/anEQlm7x5zRNhOCWHsXXAc9 91a619vExPmDKVAQbvpcwRBMQz6FQFSy3o4w1GNdUb5PhxrNjZMl9Lwu6DTysfjjetI7UecQHM hvlhkQBcbcOpldR1G2v1M8S4XOfqpJ6vohr3TBtBYXSjV8rPYTb1tO5KS3fyp+xu/49krpN6s4 rp+oWNe0KDbhJM0WErSeaJd1B99awLyNhsnaV1rkFHNmYJJsiVDp5oUTD6TMyp0+2LWFVz2GDm r4I= Message-ID: <8d81066f-3436-3f0d-6c03-ee8d38e0e255@codesourcery.com> Date: Tue, 26 Oct 2021 11:30:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH,Fortran 3/7] Fortran: make some constructor* functions static Content-Language: en-US To: Bernhard Reutner-Fischer , , CC: Bernhard Reutner-Fischer References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> <20211024223023.1410274-4-rep.dot.nop@gmail.com> From: Tobias Burnus In-Reply-To: <20211024223023.1410274-4-rep.dot.nop@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2021 09:30:53 -0000 On 25.10.21 00:30, Bernhard Reutner-Fischer via Fortran wrote: > From: Bernhard Reutner-Fischer > gfc_constructor_expr_foreach and gfc_constructor_swap were just stubs. > gcc/fortran/ChangeLog: > > * constructor.c (gfc_constructor_get_base): Make static. > (gfc_constructor_expr_foreach, (gfc_constructor_swap): Delete. > * constructor.h (gfc_constructor_get_base): Remove declaration. > (gfc_constructor_expr_foreach, (gfc_constructor_swap): Delete. OK. Thanks for the cleanup. Tobias > --- > gcc/fortran/constructor.c | 20 ++------------------ > gcc/fortran/constructor.h | 10 ---------- > 2 files changed, 2 insertions(+), 28 deletions(-) > > diff --git a/gcc/fortran/constructor.c b/gcc/fortran/constructor.c > index 3e4377a5ad3..4b5a748271b 100644 > --- a/gcc/fortran/constructor.c > +++ b/gcc/fortran/constructor.c > @@ -85,7 +85,8 @@ gfc_constructor_get (void) > return c; > } > > -gfc_constructor_base gfc_constructor_get_base (void) > +static gfc_constructor_base > +gfc_constructor_get_base (void) > { > return splay_tree_new (splay_tree_compare_ints, NULL, node_free); > } > @@ -209,23 +210,6 @@ gfc_constructor_lookup_expr (gfc_constructor_base ba= se, int offset) > } > > > -int > -gfc_constructor_expr_foreach (gfc_constructor *ctor ATTRIBUTE_UNUSED, > - int(*f)(gfc_expr *) ATTRIBUTE_UNUSED) > -{ > - gcc_assert (0); > - return 0; > -} > - > -void > -gfc_constructor_swap (gfc_constructor *ctor ATTRIBUTE_UNUSED, > - int n ATTRIBUTE_UNUSED, int m ATTRIBUTE_UNUSED) > -{ > - gcc_assert (0); > -} > - > - > - > gfc_constructor * > gfc_constructor_first (gfc_constructor_base base) > { > diff --git a/gcc/fortran/constructor.h b/gcc/fortran/constructor.h > index 85a72dcfc0e..25cd6a8f192 100644 > --- a/gcc/fortran/constructor.h > +++ b/gcc/fortran/constructor.h > @@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see > /* Get a new constructor structure. */ > gfc_constructor *gfc_constructor_get (void); > > -gfc_constructor_base gfc_constructor_get_base (void); > - > /* Copy a constructor structure. */ > gfc_constructor_base gfc_constructor_copy (gfc_constructor_base base); > > @@ -64,14 +62,6 @@ gfc_constructor *gfc_constructor_lookup (gfc_construct= or_base base, int n); > */ > gfc_expr *gfc_constructor_lookup_expr (gfc_constructor_base base, int n= ); > > - > -int gfc_constructor_expr_foreach (gfc_constructor *ctor, int(*)(gfc_expr= *)); > - > - > -void gfc_constructor_swap (gfc_constructor *ctor, int n, int m); > - > - > - > /* Get the first constructor node in the constructure structure. > Returns NULL if there is no such expression. */ > gfc_constructor *gfc_constructor_first (gfc_constructor_base base); ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955