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-3727] ada: Clean up code for visibility of generic actuals Date: Mon, 7 Nov 2022 08:38:47 +0000 (GMT) [thread overview] Message-ID: <20221107083847.1FF40385840A@sourceware.org> (raw) https://gcc.gnu.org/g:4e92ad48dcfdb726f72f35039c5c102a99bf7759 commit r13-3727-g4e92ad48dcfdb726f72f35039c5c102a99bf7759 Author: Piotr Trojanek <trojanek@adacore.com> Date: Fri Aug 12 11:55:35 2022 +0200 ada: Clean up code for visibility of generic actuals Code cleanup related to fixing visibility of actual parameters in inlining-for-proof in GNATprove mode; semantics is unaffected. gcc/ada/ * sem_ch12.adb (Check_Generic_Actuals): Remove redundant parens; refactor an excessive if-statement; remove repeated call to Node. Diff: --- gcc/ada/sem_ch12.adb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 0b7b7c904d3..2b7833dfdcd 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -7023,7 +7023,7 @@ package body Sem_Ch12 is Astype := First_Subtype (E); end if; - Set_Size_Info (E, (Astype)); + Set_Size_Info (E, Astype); Copy_RM_Size (To => E, From => Astype); Set_First_Rep_Item (E, First_Rep_Item (Astype)); @@ -7054,12 +7054,10 @@ package body Sem_Ch12 is elsif Present (Associated_Formal_Package (E)) and then not Is_Generic_Formal (E) then - if Box_Present (Parent (Associated_Formal_Package (E))) then - Check_Generic_Actuals (Renamed_Entity (E), True); - - else - Check_Generic_Actuals (Renamed_Entity (E), False); - end if; + Check_Generic_Actuals + (Renamed_Entity (E), + Is_Formal_Box => + Box_Present (Parent (Associated_Formal_Package (E)))); Set_Is_Hidden (E, False); end if; @@ -15457,7 +15455,7 @@ package body Sem_Ch12 is end loop; end if; - Exchange_Declarations (Node (M)); + Exchange_Declarations (Typ); Next_Elmt (M); end loop;
reply other threads:[~2022-11-07 8:38 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=20221107083847.1FF40385840A@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).