public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3783] ada: Remove unneeded code in handling formal type defaults
Date: Tue,  8 Nov 2022 08:40:59 +0000 (GMT)	[thread overview]
Message-ID: <20221108084059.9F05F385840D@sourceware.org> (raw)

https://gcc.gnu.org/g:d96a20bf2ef939c0dd9d2bb32c59267842279c29

commit r13-3783-gd96a20bf2ef939c0dd9d2bb32c59267842279c29
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Tue Sep 6 23:20:47 2022 +0200

    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.

Diff:
---
 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);

                 reply	other threads:[~2022-11-08  8:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221108084059.9F05F385840D@sourceware.org \
    --to=dkm@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).