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-1258] ada: Refine types for an accessibility-checking routine
Date: Fri, 26 May 2023 07:35:22 +0000 (GMT)	[thread overview]
Message-ID: <20230526073522.5A1173858418@sourceware.org> (raw)

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

commit r14-1258-gda59893d855a2d10e9c94b57c9b2d4d91f05a140
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Wed Feb 1 21:47:32 2023 +0100

    ada: Refine types for an accessibility-checking routine
    
    Code cleanup related to work on expression functions for GNATprove
    (which require accessibility checks even when they are not expanded
    and thus have no explicit return statements).
    
    gcc/ada/
    
            * accessibility.adb
            (Is_Formal_Of_Current_Function): This routine expects an entity
            reference and not the entity itself, so its parameter is a Node_Id
            and not an Entity_Id.

Diff:
---
 gcc/ada/accessibility.adb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/accessibility.adb b/gcc/ada/accessibility.adb
index c65c26d8875..bc897d1ef18 100644
--- a/gcc/ada/accessibility.adb
+++ b/gcc/ada/accessibility.adb
@@ -1153,7 +1153,7 @@ package body Accessibility is
       --  Obtain the first selector or choice from a given association
 
       function Is_Formal_Of_Current_Function
-        (Assoc_Expr : Entity_Id) return Boolean;
+        (Assoc_Expr : Node_Id) return Boolean;
       --  Predicate to test if a given expression associated with a
       --  discriminant is a formal parameter to the function in which the
       --  return construct we checking applies to.
@@ -1180,7 +1180,7 @@ package body Accessibility is
       -----------------------------------
 
       function Is_Formal_Of_Current_Function
-        (Assoc_Expr : Entity_Id) return Boolean is
+        (Assoc_Expr : Node_Id) return Boolean is
       begin
          return Is_Entity_Name (Assoc_Expr)
                   and then Enclosing_Subprogram

                 reply	other threads:[~2023-05-26  7:35 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=20230526073522.5A1173858418@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).