public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-3752] [Ada] SCOs: generate 'P' decisions for [Type_]Invariant pragmas
Date: Tue, 21 Sep 2021 15:27:56 +0000 (GMT)	[thread overview]
Message-ID: <20210921152756.3837B3857402@sourceware.org> (raw)

https://gcc.gnu.org/g:57fb9d3820cd955ba0af1baadb27cd9a756a87c8

commit r12-3752-g57fb9d3820cd955ba0af1baadb27cd9a756a87c8
Author: Matthieu Eyraud <eyraud@adacore.com>
Date:   Wed Jul 7 19:33:25 2021 +0200

    [Ada] SCOs: generate 'P' decisions for [Type_]Invariant pragmas
    
    gcc/ada/
    
            * par_sco.adb (Traverse_One): Add support for pragma Invariant /
            Type_Invariant.

Diff:
---
 gcc/ada/par_sco.adb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb
index b4f76091f44..513275a495a 100644
--- a/gcc/ada/par_sco.adb
+++ b/gcc/ada/par_sco.adb
@@ -2248,6 +2248,8 @@ package body Par_SCO is
                         | Name_Loop_Invariant
                         | Name_Postcondition
                         | Name_Precondition
+                        | Name_Type_Invariant
+                        | Name_Invariant
                      =>
                         --  For Assert/Check/Precondition/Postcondition, we
                         --  must generate a P entry for the decision. Note
@@ -2256,7 +2258,10 @@ package body Par_SCO is
                         --  on when we output the decision line in Put_SCOs,
                         --  depending on setting by Set_SCO_Pragma_Enabled.
 
-                        if Nam = Name_Check then
+                        if Nam = Name_Check
+                           or else Nam = Name_Type_Invariant
+                           or else Nam = Name_Invariant
+                        then
                            Next (Arg);
                         end if;
 
@@ -2285,8 +2290,7 @@ package body Par_SCO is
                      --  never disabled.
 
                      --  Should generate P decisions (not X) for assertion
-                     --  related pragmas: [Type_]Invariant,
-                     --  [{Static,Dynamic}_]Predicate???
+                     --  related pragmas: [{Static,Dynamic}_]Predicate???
 
                      when others =>
                         Process_Decisions_Defer (N, 'X');


                 reply	other threads:[~2021-09-21 15:27 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=20210921152756.3837B3857402@sourceware.org \
    --to=pmderodat@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).