* [COMMITTED] ada: Remove unneeded code in handling formal type defaults
@ 2022-11-08 8:42 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2022-11-08 8:42 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
From: Piotr Trojanek <trojanek@adacore.com>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch12.adb | 6 ++----
1 file 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);
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-08 8:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 8:42 [COMMITTED] ada: Remove unneeded code in handling formal type defaults Marc Poulhiès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).