public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Piotr Trojanek <trojanek@adacore.com>
Subject: [COMMITTED] ada: Fix copy-paste mistake in analysis of Exceptional_Cases
Date: Thu, 25 May 2023 10:05:42 +0200	[thread overview]
Message-ID: <20230525080542.1956225-1-poulhies@adacore.com> (raw)

From: Piotr Trojanek <trojanek@adacore.com>

Trivial mistakes in copied code.

gcc/ada/

	* sem_prag.adb (Analyze_Pragma): Fix references to Exceptional_Cases in
	code copied from handling of Subprogram_Variant.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_prag.adb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 963c6dea238..40636f21fc7 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -16688,7 +16688,7 @@ package body Sem_Prag is
             Ensure_Aggregate_Form (Get_Argument (N, Spec_Id));
 
             --  Chain the pragma on the contract for further processing by
-            --  Analyze_Subprogram_Variant_In_Decl_Part.
+            --  Analyze_Exceptional_Cases_In_Decl_Part.
 
             Add_Contract_Item (N, Defining_Entity (Subp_Decl));
 
@@ -16698,13 +16698,13 @@ package body Sem_Prag is
             if Nkind (Subp_Decl) in N_Subprogram_Body
                                   | N_Subprogram_Body_Stub
             then
-               --  The legality checks of pragma Subprogram_Variant are
+               --  The legality checks of pragma Exceptional_Cases are
                --  affected by the SPARK mode in effect and the volatility
                --  of the context. Analyze all pragmas in a specific order.
 
                Analyze_If_Present (Pragma_SPARK_Mode);
                Analyze_If_Present (Pragma_Volatile_Function);
-               Analyze_Subprogram_Variant_In_Decl_Part (N);
+               Analyze_Exceptional_Cases_In_Decl_Part (N);
             end if;
          end Exceptional_Cases;
 
-- 
2.40.0


                 reply	other threads:[~2023-05-25  8:05 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=20230525080542.1956225-1-poulhies@adacore.com \
    --to=poulhies@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=trojanek@adacore.com \
    /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).