[Ada] Update comment for processing of pragma Assertion_Policy
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 5 Nov 2020 09:14:36 +0000 (10:14 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 14 Dec 2020 15:51:48 +0000 (10:51 -0500)
gcc/ada/

* sa_messages.ads: Reference Subprogram_Variant in the comment
for Assertion_Check.
* sem_prag.adb (Analyze_Pragma): Add Subprogram_Variant as an
ID_ASSERTION_KIND; move Default_Initial_Condition as an
RM_ASSERTION_KIND.

gcc/ada/sa_messages.ads
gcc/ada/sem_prag.adb

index 11da9fc8073b6e65debd9bafb017f4e489c0ad94..1f6fca8c939034e0176ece10b6b0d6b7feda4ae0 100644 (file)
@@ -94,7 +94,7 @@ package SA_Messages is
    --  type invariant checks (specific and class-wide), and checks for
    --  implementation-defined assertions such as Assert_And_Cut, Assume,
    --  Contract_Cases, Default_Initial_Condition, Initial_Condition,
-   --  Loop_Invariant, Loop_Variant, and Refined_Post.
+   --  Loop_Invariant, Loop_Variant, Refined_Post, and Subprogram_Variant.
    --
    --  TBD: it might be nice to distinguish these different kinds of assertions
    --  as is done in SPARK's VC_Kind enumeration type, but any distinction
index 1bcbb25d5f9038c1b19a495ee5c14919e1bd50e6..094591b5ec9d26f08a6cd23be543dd1bd92d3976 100644 (file)
@@ -12903,30 +12903,31 @@ package body Sem_Prag is
 
          --  ASSERTION_KIND ::= RM_ASSERTION_KIND | ID_ASSERTION_KIND
 
-         --  RM_ASSERTION_KIND ::= Assert               |
-         --                        Static_Predicate     |
-         --                        Dynamic_Predicate    |
-         --                        Pre                  |
-         --                        Pre'Class            |
-         --                        Post                 |
-         --                        Post'Class           |
-         --                        Type_Invariant       |
-         --                        Type_Invariant'Class
-
-         --  ID_ASSERTION_KIND ::= Assert_And_Cut            |
-         --                        Assume                    |
-         --                        Contract_Cases            |
-         --                        Debug                     |
-         --                        Default_Initial_Condition |
-         --                        Ghost                     |
-         --                        Initial_Condition         |
-         --                        Loop_Invariant            |
-         --                        Loop_Variant              |
-         --                        Postcondition             |
-         --                        Precondition              |
-         --                        Predicate                 |
-         --                        Refined_Post              |
-         --                        Statement_Assertions
+         --  RM_ASSERTION_KIND ::= Assert                     |
+         --                        Static_Predicate           |
+         --                        Dynamic_Predicate          |
+         --                        Pre                        |
+         --                        Pre'Class                  |
+         --                        Post                       |
+         --                        Post'Class                 |
+         --                        Type_Invariant             |
+         --                        Type_Invariant'Class       |
+         --                        Default_Initial_Condition
+
+         --  ID_ASSERTION_KIND ::= Assert_And_Cut       |
+         --                        Assume               |
+         --                        Contract_Cases       |
+         --                        Debug                |
+         --                        Ghost                |
+         --                        Initial_Condition    |
+         --                        Loop_Invariant       |
+         --                        Loop_Variant         |
+         --                        Postcondition        |
+         --                        Precondition         |
+         --                        Predicate            |
+         --                        Refined_Post         |
+         --                        Statement_Assertions |
+         --                        Subprogram_Variant
 
          --  Note: The RM_ASSERTION_KIND list is language-defined, and the
          --  ID_ASSERTION_KIND list contains implementation-defined additions