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 r14-3695] ada: Remove redundant guard against an empty list of interfaces Date: Tue, 5 Sep 2023 11:09:12 +0000 (GMT) [thread overview] Message-ID: <20230905110912.16C2B3853830@sourceware.org> (raw) https://gcc.gnu.org/g:e394afd4a584fb4546be3b79270620f79989a387 commit r14-3695-ge394afd4a584fb4546be3b79270620f79989a387 Author: Piotr Trojanek <trojanek@adacore.com> Date: Wed Aug 23 15:53:07 2023 +0200 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. Diff: --- gcc/ada/sem_type.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index 00a64152df1c..bbdcd5f24b8a 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);
reply other threads:[~2023-09-05 11:09 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=20230905110912.16C2B3853830@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: linkBe 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).