]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[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 d3bc3ba22a3744897e617b36eb3202b793dff629..e3a2de6abd4fa00c292f9c8a7af819279542197b 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 9ccd9c2c40972ce5945638b1e41958dfc454a6c0..e9b02682fda0e5e25c8eaa6857105fb4a8dc584e 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 47aaf0d5cf89ddb8d40e42798b2be18f2bef3116..5d578632a05d508bdb55fd4e948e77defc60df6a 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 a8aeaa2c43884a4fd1b50f77c63e0568f504c69b..37dde920137e27200565fd0416c5a9ef765ae701 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 4e17978d361647246b8eacee9323009ff768a8f5..d32727ea99641ef455865bb9f76bca4e3db69109 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 61a93a3dd5476875d3d03aa951665a55a428a029..12d2d3c4758b0495b546b6979b47d7136a298ac3 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 217032f5174b7ea61aa55245161bafc58d29ae9b..61115ddc467c1562aca9049f34452d42095cff12 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