public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3752] [Ada] SCOs: generate 'P' decisions for [Type_]Invariant pragmas
@ 2021-09-21 15:27 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-21 15:27 UTC (permalink / raw)
To: gcc-cvs
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');
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-21 15:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 15:27 [gcc r12-3752] [Ada] SCOs: generate 'P' decisions for [Type_]Invariant pragmas Pierre-Marie de Rodat
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).