summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-09-06 23:20:47 +0200
committerMarc Poulhiès <poulhies@adacore.com>2022-11-08 09:34:59 +0100
commitd96a20bf2ef939c0dd9d2bb32c59267842279c29 (patch)
treee6b53e4f3edc35f1007b2892bce1afd851c304d0
parent5c0722cb40ac1be1e5c40b3aff6fc7b58e3e4cba (diff)
ada: Remove unneeded code in handling formal type defaults
Unneeded code found while experimenting with improved detection of unreferenced objects. gcc/ada/ * sem_ch12.adb (Validate_Formal_Type_Default): Remove call to Collect_Interfaces, which had no effect apart from populating a list that was not used; fix style.
-rw-r--r--gcc/ada/sem_ch12.adb6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 2b7833dfdcd..ca0f4913e36 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -17303,13 +17303,11 @@ package body Sem_Ch12 is
else
declare
- Act_Iface_List : Elist_Id;
- Iface : Node_Id;
- Iface_Ent : Entity_Id;
+ Iface : Node_Id;
+ Iface_Ent : Entity_Id;
begin
Iface := First (Abstract_Interface_List (Formal));
- Collect_Interfaces (Def_Sub, Act_Iface_List);
while Present (Iface) loop
Iface_Ent := Entity (Iface);