From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id 16C2B3853830; Tue, 5 Sep 2023 11:09:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16C2B3853830 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693912152; bh=xV/EFCl6dNHMsGuiZ7+o7iSg+eoV02zvN9YXeWvV+MA=; h=From:To:Subject:Date:From; b=Y8Jn/pXx9tGbKZelh0P00WLNRXVk03Sd8Z/Bi8Ob2b1cay4XlFJopuxesb0BsEZZY xZsZPrckX8cMpNN5A1jo1mYBpWc7wGjOVdSxy9pV3DHG1r2xEQ8p2PPM3frBZpIycb 9sZ7LoXCVVNKI6e527XVCc9NJuwrGULBbfG+xazQ= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-3695] ada: Remove redundant guard against an empty list of interfaces X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: adb3b4d11cb11a35b17bef2590bcdf6bffb06f21 X-Git-Newrev: e394afd4a584fb4546be3b79270620f79989a387 Message-Id: <20230905110912.16C2B3853830@sourceware.org> Date: Tue, 5 Sep 2023 11:09:12 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e394afd4a584fb4546be3b79270620f79989a387 commit r14-3695-ge394afd4a584fb4546be3b79270620f79989a387 Author: Piotr Trojanek Date: Wed Aug 23 15:53:07 2023 +0200 ada: Remove redundant guard against an empty list of interfaces Code cleanup; semantics is unaffected. gcc/ada/ * sem_type.adb (Iface_Present_In_Ancestor): Remove guard for empty list of interfaces; the following loop will work just fine without it. Diff: --- gcc/ada/sem_type.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index 00a64152df1c..bbdcd5f24b8a 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -2578,9 +2578,7 @@ package body Sem_Type is end if; loop - if Present (Interfaces (E)) - and then not Is_Empty_Elmt_List (Interfaces (E)) - then + if Present (Interfaces (E)) then Elmt := First_Elmt (Interfaces (E)); while Present (Elmt) loop AI := Node (Elmt);