[Ada] Disable Pre/Post in formal containers
authorClaire Dross <dross@adacore.com>
Mon, 12 Apr 2021 07:48:48 +0000 (09:48 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 29 Jun 2021 14:23:48 +0000 (14:23 +0000)
gcc/ada/

* libgnat/a-cfdlli.ads: Use pragma Assertion_Policy to disable
pre and postconditions.
* libgnat/a-cfhama.ads: Likewise.
* libgnat/a-cfhase.ads: Likewise.
* libgnat/a-cfinve.ads: Likewise.
* libgnat/a-cforma.ads: Likewise.
* libgnat/a-cforse.ads: Likewise.
* libgnat/a-cofove.ads: Likewise.

gcc/ada/libgnat/a-cfdlli.ads
gcc/ada/libgnat/a-cfhama.ads
gcc/ada/libgnat/a-cfhase.ads
gcc/ada/libgnat/a-cfinve.ads
gcc/ada/libgnat/a-cforma.ads
gcc/ada/libgnat/a-cforse.ads
gcc/ada/libgnat/a-cofove.ads

index d3bc3ba..e3a2de6 100644 (file)
@@ -39,6 +39,11 @@ generic
 package Ada.Containers.Formal_Doubly_Linked_Lists with
   SPARK_Mode
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    type List (Capacity : Count_Type) is private with
index 9ccd9c2..e9b0268 100644 (file)
@@ -64,6 +64,11 @@ generic
 package Ada.Containers.Formal_Hashed_Maps with
   SPARK_Mode
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    type Map (Capacity : Count_Type; Modulus : Hash_Type) is private with
index 47aaf0d..5d57863 100644 (file)
@@ -62,6 +62,11 @@ generic
 package Ada.Containers.Formal_Hashed_Sets with
   SPARK_Mode
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    type Set (Capacity : Count_Type; Modulus : Hash_Type) is private with
index a8aeaa2..37dde92 100644 (file)
@@ -55,6 +55,11 @@ generic
 package Ada.Containers.Formal_Indefinite_Vectors with
   SPARK_Mode => On
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    subtype Extended_Index is Index_Type'Base
index 4e17978..d32727e 100644 (file)
@@ -63,6 +63,11 @@ generic
 package Ada.Containers.Formal_Ordered_Maps with
   SPARK_Mode
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    function Equivalent_Keys (Left, Right : Key_Type) return Boolean with
index 61a93a3..12d2d3c 100644 (file)
@@ -59,6 +59,11 @@ generic
 package Ada.Containers.Formal_Ordered_Sets with
   SPARK_Mode
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    function Equivalent_Elements (Left, Right : Element_Type) return Boolean
index 217032f..61115dd 100644 (file)
@@ -45,6 +45,11 @@ generic
 package Ada.Containers.Formal_Vectors with
   SPARK_Mode
 is
+   --  Contracts in this unit are meant for analysis only, not for run-time
+   --  checking.
+
+   pragma Assertion_Policy (Pre => Ignore);
+   pragma Assertion_Policy (Post => Ignore);
    pragma Annotate (CodePeer, Skip_Analysis);
 
    subtype Extended_Index is Index_Type'Base