From: Piotr Trojanek Date: Wed, 23 Aug 2023 13:53:07 +0000 (+0200) Subject: ada: Remove redundant guard against an empty list of interfaces X-Git-Tag: basepoints/gcc-15~6444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e394afd4a584fb4546be3b79270620f79989a387;p=thirdparty%2Fgcc.git 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 --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);