From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 1DD4C383D815; Thu, 12 May 2022 12:41:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DD4C383D815 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-368] [Ada] Remove unreferenced Is_Selector_Name routine X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 09c7e3175a16d15c7229486e9ce049b2c0daa4f1 X-Git-Newrev: 0c1ec8ae18b57131f62c31e0144dd0d8aa3a92eb Message-Id: <20220512124154.1DD4C383D815@sourceware.org> Date: Thu, 12 May 2022 12:41:54 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2022 12:41:54 -0000 https://gcc.gnu.org/g:0c1ec8ae18b57131f62c31e0144dd0d8aa3a92eb commit r13-368-g0c1ec8ae18b57131f62c31e0144dd0d8aa3a92eb Author: Piotr Trojanek Date: Tue Feb 15 17:59:10 2022 +0100 [Ada] Remove unreferenced Is_Selector_Name routine Function Is_Selector_Name was added in 1995 while experimenting with default expressions in record declarations. This experiment was abandoned after one day and this routine was never used since then. gcc/ada/ * sem_util.ads (Is_Selector_Name): Remove spec. * sem_util.adb (Is_Selector_Name): Remove body. Diff: --- gcc/ada/sem_util.adb | 31 ------------------------------- gcc/ada/sem_util.ads | 6 ------ 2 files changed, 37 deletions(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 0b7d351721c..43b2c809f2c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -20972,37 +20972,6 @@ package body Sem_Util is return False; end Is_Reversible_Iterator; - ---------------------- - -- Is_Selector_Name -- - ---------------------- - - function Is_Selector_Name (N : Node_Id) return Boolean is - begin - if not Is_List_Member (N) then - declare - P : constant Node_Id := Parent (N); - begin - return Nkind (P) in N_Expanded_Name - | N_Generic_Association - | N_Parameter_Association - | N_Selected_Component - and then Selector_Name (P) = N; - end; - - else - declare - L : constant List_Id := List_Containing (N); - P : constant Node_Id := Parent (L); - begin - return (Nkind (P) = N_Discriminant_Association - and then Selector_Names (P) = L) - or else - (Nkind (P) = N_Component_Association - and then Choices (P) = L); - end; - end if; - end Is_Selector_Name; - --------------------------------- -- Is_Single_Concurrent_Object -- --------------------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index e376c332f2b..bd2253003df 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -2337,12 +2337,6 @@ package Sem_Util is -- AI05-0139-2: Check whether Typ is derived from the predefined interface -- Ada.Iterator_Interfaces.Reversible_Iterator. - function Is_Selector_Name (N : Node_Id) return Boolean; - -- Given an N_Identifier node N, determines if it is a Selector_Name. - -- As described in Sinfo, Selector_Names are special because they - -- represent use of the N_Identifier node for a true identifier, when - -- normally such nodes represent a direct name. - function Is_Single_Concurrent_Object (Id : Entity_Id) return Boolean; -- Determine whether arbitrary entity Id denotes the anonymous object -- created for a single protected or single task type.