summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cfdlli.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-19 14:59:32 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-19 14:59:32 +0000
commit0454b175f10cfe3c04866ed1c58440954db88830 (patch)
treeb221f814aa37449bd76edb385d28670d5b39101c /gcc/ada/a-cfdlli.ads
parentca3140f06cb098075ccd6d431b71b391216e4015 (diff)
downloadgcc-0454b175f10cfe3c04866ed1c58440954db88830.tar.gz
2014-02-19 Matthew Heaney <heaney@adacore.com>
* a-chtgop.ads (Checked_Index): New operation. (Next): Changed mode of hash table. * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering (Generic_Read, Reserve_Capacity): Ditto. (Generic_Equal): Detect tampering. (Next): Changed mode of hash table, detect tampering. * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New operation. (Find): Changed mode of hash table. * a-chtgke.adb (Checked_Equivalent_Keys): New operation (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect tampering. (Find): Changed mode of hash table, check for tampering. (Generic_Replace_Element): Check for tampering. * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation. * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New operation (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect tampering. (Find, Generic_Replace_Element): Check for tampering. * a-chtgbo.ads (Checked_Index): New operation. * a-chtgbo.adb (Checked_Index): New operation (Delete_Node_Sans_Free, Generic_Equal): Detect tampering. (Generic_Read, Next): Ditto. * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash table (Difference, Intersection): Use variable view of source, detect tampering (Find, Is_Subset, Overlap): Use variable view of container (Symmetric_Difference, Union): Detect tampering (Vet): Use Checked_Index to detect tampering (Constant_Reference, Element, Find): Use variable view of container. (Update_Element_Preserving_Key): Detect tampering. * a-cbhase.adb (Difference, Find, Is_In): Use variable view of container. (Is_Subset): Ditto. (Equivalent_Sets, Overlap): Use Node's Next component. (Vet): Use Checked_Index to detect tampering. (Constant_Reference, Element, Find): Use variable view of container. (Update_Element_Preserving_Key): Detect tampering. * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference, Element, Find): Use variable view of container. (Reference): Rename hash table component. (Vet): Use Checked_Index to detect tampering. 2014-02-19 Arnaud Charlet <charlet@adacore.com> * adabkend.adb (Scan_Compiler_Arguments): Add missing handling of -nostdinc. 2014-02-19 Thomas Quinot <quinot@adacore.com> * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard against calls without Def_Id. 2014-02-19 Claire Dross <dross@adacore.com> * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads, a-cofove.ads: Add global annotations to subprograms. 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove constants Errors, Pack_Id and Pack_Init. Remove variable Vars. Initial_Condition no longer requires the presence of pragma Initialized. Do not try to diagnose whether all variables mentioned in pragma Initializes also appear in Initial_Condition. (Collect_Variables): Removed. (Match_Variable): Removed. (Match_Variables): Removed. (Report_Unused_Variables): Removed. 2014-02-19 Thomas Quinot <quinot@adacore.com> * gnat_rm.texi (pragma Stream_Convert): Minor rewording. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207905 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cfdlli.ads')
-rw-r--r--gcc/ada/a-cfdlli.ads155
1 files changed, 100 insertions, 55 deletions
diff --git a/gcc/ada/a-cfdlli.ads b/gcc/ada/a-cfdlli.ads
index 7b19f1dd2e3..8b169e46cc7 100644
--- a/gcc/ada/a-cfdlli.ads
+++ b/gcc/ada/a-cfdlli.ads
@@ -77,35 +77,44 @@ package Ada.Containers.Formal_Doubly_Linked_Lists is
No_Element : constant Cursor;
- function "=" (Left, Right : List) return Boolean;
+ function "=" (Left, Right : List) return Boolean with
+ Global => null;
- function Length (Container : List) return Count_Type;
+ function Length (Container : List) return Count_Type with
+ Global => null;
- function Is_Empty (Container : List) return Boolean;
+ function Is_Empty (Container : List) return Boolean with
+ Global => null;
- procedure Clear (Container : in out List);
+ procedure Clear (Container : in out List) with
+ Global => null;
procedure Assign (Target : in out List; Source : List) with
- Pre => Target.Capacity >= Length (Source);
+ Global => null,
+ Pre => Target.Capacity >= Length (Source);
function Copy (Source : List; Capacity : Count_Type := 0) return List with
- Pre => Capacity = 0 or else Capacity >= Source.Capacity;
+ Global => null,
+ Pre => Capacity = 0 or else Capacity >= Source.Capacity;
function Element
(Container : List;
Position : Cursor) return Element_Type
with
- Pre => Has_Element (Container, Position);
+ Global => null,
+ Pre => Has_Element (Container, Position);
procedure Replace_Element
(Container : in out List;
Position : Cursor;
New_Item : Element_Type)
with
- Pre => Has_Element (Container, Position);
+ Global => null,
+ Pre => Has_Element (Container, Position);
procedure Move (Target : in out List; Source : in out List) with
- Pre => Target.Capacity >= Length (Source);
+ Global => null,
+ Pre => Target.Capacity >= Length (Source);
procedure Insert
(Container : in out List;
@@ -113,9 +122,10 @@ package Ada.Containers.Formal_Doubly_Linked_Lists is
New_Item : Element_Type;
Count : Count_Type := 1)
with
- Pre => Length (Container) + Count <= Container.Capacity
- and then (Has_Element (Container, Before)
- or else Before = No_Element);
+ Global => null,
+ Pre => Length (Container) + Count <= Container.Capacity
+ and then (Has_Element (Container, Before)
+ or else Before = No_Element);
procedure Insert
(Container : in out List;
@@ -124,9 +134,10 @@ package Ada.Containers.Formal_Doubly_Linked_Lists is
Position : out Cursor;
Count : Count_Type := 1)
with
- Pre => Length (Container) + Count <= Container.Capacity
- and then (Has_Element (Container, Before)
- or else Before = No_Element);
+ Global => null,
+ Pre => Length (Container) + Count <= Container.Capacity
+ and then (Has_Element (Container, Before)
+ or else Before = No_Element);
procedure Insert
(Container : in out List;
@@ -134,61 +145,73 @@ package Ada.Containers.Formal_Doubly_Linked_Lists is
Position : out Cursor;
Count : Count_Type := 1)
with
- Pre => Length (Container) + Count <= Container.Capacity
- and then (Has_Element (Container, Before)
- or else Before = No_Element);
+ Global => null,
+ Pre => Length (Container) + Count <= Container.Capacity
+ and then (Has_Element (Container, Before)
+ or else Before = No_Element);
procedure Prepend
(Container : in out List;
New_Item : Element_Type;
Count : Count_Type := 1)
with
- Pre => Length (Container) + Count <= Container.Capacity;
+ Global => null,
+ Pre => Length (Container) + Count <= Container.Capacity;
procedure Append
(Container : in out List;
New_Item : Element_Type;
Count : Count_Type := 1)
with
- Pre => Length (Container) + Count <= Container.Capacity;
+ Global => null,
+ Pre => Length (Container) + Count <= Container.Capacity;
procedure Delete
(Container : in out List;
Position : in out Cursor;
Count : Count_Type := 1)
with
- Pre => Has_Element (Container, Position);
+ Global => null,
+ Pre => Has_Element (Container, Position);
procedure Delete_First
(Container : in out List;
- Count : Count_Type := 1);
+ Count : Count_Type := 1)
+ with
+ Global => null;
procedure Delete_Last
(Container : in out List;
- Count : Count_Type := 1);
+ Count : Count_Type := 1)
+ with
+ Global => null;
- procedure Reverse_Elements (Container : in out List);
+ procedure Reverse_Elements (Container : in out List) with
+ Global => null;
procedure Swap
(Container : in out List;
I, J : Cursor)
with
- Pre => Has_Element (Container, I) and then Has_Element (Container, J);
+ Global => null,
+ Pre => Has_Element (Container, I) and then Has_Element (Container, J);
procedure Swap_Links
(Container : in out List;
I, J : Cursor)
with
- Pre => Has_Element (Container, I) and then Has_Element (Container, J);
+ Global => null,
+ Pre => Has_Element (Container, I) and then Has_Element (Container, J);
procedure Splice
(Target : in out List;
Before : Cursor;
Source : in out List)
with
- Pre => Length (Source) + Length (Target) <= Target.Capacity
- and then (Has_Element (Target, Before)
- or else Before = No_Element);
+ Global => null,
+ Pre => Length (Source) + Length (Target) <= Target.Capacity
+ and then (Has_Element (Target, Before)
+ or else Before = No_Element);
procedure Splice
(Target : in out List;
@@ -196,84 +219,106 @@ package Ada.Containers.Formal_Doubly_Linked_Lists is
Source : in out List;
Position : in out Cursor)
with
- Pre => Length (Source) + Length (Target) <= Target.Capacity
- and then (Has_Element (Target, Before)
- or else Before = No_Element)
- and then Has_Element (Source, Position);
+ Global => null,
+ Pre => Length (Source) + Length (Target) <= Target.Capacity
+ and then (Has_Element (Target, Before)
+ or else Before = No_Element)
+ and then Has_Element (Source, Position);
procedure Splice
(Container : in out List;
Before : Cursor;
Position : Cursor)
with
- Pre => 2 * Length (Container) <= Container.Capacity
- and then (Has_Element (Container, Before)
- or else Before = No_Element)
- and then Has_Element (Container, Position);
+ Global => null,
+ Pre => 2 * Length (Container) <= Container.Capacity
+ and then (Has_Element (Container, Before)
+ or else Before = No_Element)
+ and then Has_Element (Container, Position);
- function First (Container : List) return Cursor;
+ function First (Container : List) return Cursor with
+ Global => null;
function First_Element (Container : List) return Element_Type with
- Pre => not Is_Empty (Container);
+ Global => null,
+ Pre => not Is_Empty (Container);
- function Last (Container : List) return Cursor;
+ function Last (Container : List) return Cursor with
+ Global => null;
function Last_Element (Container : List) return Element_Type with
- Pre => not Is_Empty (Container);
+ Global => null,
+ Pre => not Is_Empty (Container);
function Next (Container : List; Position : Cursor) return Cursor with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
procedure Next (Container : List; Position : in out Cursor) with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
function Previous (Container : List; Position : Cursor) return Cursor with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
procedure Previous (Container : List; Position : in out Cursor) with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
function Find
(Container : List;
Item : Element_Type;
Position : Cursor := No_Element) return Cursor
with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
function Reverse_Find
(Container : List;
Item : Element_Type;
Position : Cursor := No_Element) return Cursor
with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
function Contains
(Container : List;
- Item : Element_Type) return Boolean;
+ Item : Element_Type) return Boolean
+ with
+ Global => null;
- function Has_Element (Container : List; Position : Cursor) return Boolean;
+ function Has_Element (Container : List; Position : Cursor) return Boolean
+ with
+ Global => null;
generic
with function "<" (Left, Right : Element_Type) return Boolean is <>;
package Generic_Sorting is
- function Is_Sorted (Container : List) return Boolean;
+ function Is_Sorted (Container : List) return Boolean with
+ Global => null;
- procedure Sort (Container : in out List);
+ procedure Sort (Container : in out List) with
+ Global => null;
- procedure Merge (Target, Source : in out List);
+ procedure Merge (Target, Source : in out List) with
+ Global => null;
end Generic_Sorting;
- function Strict_Equal (Left, Right : List) return Boolean;
+ function Strict_Equal (Left, Right : List) return Boolean with
+ Global => null;
-- Strict_Equal returns True if the containers are physically equal, i.e.
-- they are structurally equal (function "=" returns True) and that they
-- have the same set of cursors.
function Left (Container : List; Position : Cursor) return List with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
function Right (Container : List; Position : Cursor) return List with
- Pre => Has_Element (Container, Position) or else Position = No_Element;
+ Global => null,
+ Pre => Has_Element (Container, Position) or else Position = No_Element;
-- Left returns a container containing all elements preceding Position
-- (excluded) in Container. Right returns a container containing all
-- elements following Position (included) in Container. These two new