]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove unneeded code in handling formal type defaults
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 6 Sep 2022 21:20:47 +0000 (23:20 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 8 Nov 2022 08:34:59 +0000 (09:34 +0100)
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.

gcc/ada/sem_ch12.adb

index 2b7833dfdcdc2dfaa074c060c02f7eac4c2e0f57..ca0f4913e36c47ac0504eb3ddf7c08feb77801d5 100644 (file)
@@ -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);