aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-08-23 15:53:07 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-09-05 13:05:16 +0200
commite394afd4a584fb4546be3b79270620f79989a387 (patch)
tree6b4e031e9a3fb356361660c8a98e19b50c59c13a
parentadb3b4d11cb11a35b17bef2590bcdf6bffb06f21 (diff)
downloadgcc-e394afd4a584fb4546be3b79270620f79989a387.zip
gcc-e394afd4a584fb4546be3b79270620f79989a387.tar.gz
gcc-e394afd4a584fb4546be3b79270620f79989a387.tar.bz2
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.
-rw-r--r--gcc/ada/sem_type.adb4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index 00a6415..bbdcd5f 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);