diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-20 13:46:15 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-20 13:46:15 +0000 |
commit | 9de475762b8d4c06370c0914be86b772ff731291 (patch) | |
tree | e4cb8c593b1d1ed9ddb71de7b3a687023bdc39ba | |
parent | 315f5fb335d92a6b7a80daa7dcdd5597e0329a01 (diff) | |
download | gcc-9de475762b8d4c06370c0914be86b772ff731291.tar.gz |
2014-02-20 Robert Dewar <dewar@adacore.com>
* a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
reformatting.
2014-02-20 Bob Duff <duff@adacore.com>
* s-os_lib.ads: Minor: Remove incorrect comment.
2014-02-20 Robert Dewar <dewar@adacore.com>
* sem_elab.adb (Check_Elab_Assign): Clearer warning message.
2014-02-20 Vincent Celier <celier@adacore.com>
* gnat_rm.texi: Minor syntax error fix.
2014-02-20 Ed Schonberg <schonberg@adacore.com>
* a-cborma.adb (Assign): When creating a node without a specified
element, insert an uninitialized element in the map, because
the instance may provide an element type with a default
initialization, e.g a scalar with a Default_Value aspect.
* a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
(Insert): In the version without explicit element, provide an
uninitialized element, as above.
* a-cbdlli.adb (Append): In the version without explicit element,
provide an uninitalized element, as above.
(Allocate): Remove unused version.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207945 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 29 | ||||
-rw-r--r-- | gcc/ada/a-cbdlli.adb | 63 | ||||
-rw-r--r-- | gcc/ada/a-cbhama.adb | 14 | ||||
-rw-r--r-- | gcc/ada/a-cborma.adb | 21 | ||||
-rw-r--r-- | gcc/ada/a-chtgbk.adb | 4 | ||||
-rw-r--r-- | gcc/ada/a-chtgbo.adb | 3 | ||||
-rw-r--r-- | gcc/ada/a-chtgke.adb | 4 | ||||
-rw-r--r-- | gcc/ada/a-chtgop.adb | 8 | ||||
-rw-r--r-- | gcc/ada/a-cidlli.adb | 5 | ||||
-rw-r--r-- | gcc/ada/a-cihama.adb | 6 | ||||
-rw-r--r-- | gcc/ada/a-cihase.adb | 10 | ||||
-rw-r--r-- | gcc/ada/a-cimutr.adb | 3 | ||||
-rw-r--r-- | gcc/ada/a-ciorma.adb | 5 | ||||
-rw-r--r-- | gcc/ada/a-ciorse.adb | 3 | ||||
-rw-r--r-- | gcc/ada/a-cobove.adb | 7 | ||||
-rw-r--r-- | gcc/ada/a-cohama.adb | 3 | ||||
-rw-r--r-- | gcc/ada/a-cohase.adb | 5 | ||||
-rw-r--r-- | gcc/ada/a-coinve.adb | 4 | ||||
-rw-r--r-- | gcc/ada/a-comutr.adb | 4 | ||||
-rw-r--r-- | gcc/ada/a-convec.adb | 6 | ||||
-rw-r--r-- | gcc/ada/a-coorse.adb | 2 | ||||
-rw-r--r-- | gcc/ada/a-crbtgk.adb | 10 | ||||
-rw-r--r-- | gcc/ada/a-crbtgo.adb | 1 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 2 | ||||
-rw-r--r-- | gcc/ada/s-os_lib.ads | 6 | ||||
-rw-r--r-- | gcc/ada/sem_elab.adb | 8 |
26 files changed, 141 insertions, 95 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9d12879767e..7f519988955 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,34 @@ 2014-02-20 Robert Dewar <dewar@adacore.com> + * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb, + a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb, + a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb, + a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor + reformatting. + +2014-02-20 Bob Duff <duff@adacore.com> + + * s-os_lib.ads: Minor: Remove incorrect comment. + +2014-02-20 Robert Dewar <dewar@adacore.com> + + * sem_elab.adb (Check_Elab_Assign): Clearer warning message. + +2014-02-20 Ed Schonberg <schonberg@adacore.com> + + * a-cborma.adb (Assign): When creating a node without a specified + element, insert an uninitialized element in the map, because + the instance may provide an element type with a default + initialization, e.g a scalar with a Default_Value aspect. + * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure. + (Insert): In the version without explicit element, provide an + uninitialized element, as above. + * a-cbdlli.adb (Append): In the version without explicit element, + provide an uninitalized element, as above. + (Allocate): Remove unused version. + +2014-02-20 Robert Dewar <dewar@adacore.com> + * sem_elab.adb: Minor code reorganization (use Nkind_In). * stringt.adb: Remove temporary pragma Warnings (Off). * stringt.ads: Add pragma Elaborate_Body to ensure initialization diff --git a/gcc/ada/a-cbdlli.adb b/gcc/ada/a-cbdlli.adb index 36b9b81e83b..51e98bc40ed 100644 --- a/gcc/ada/a-cbdlli.adb +++ b/gcc/ada/a-cbdlli.adb @@ -42,10 +42,6 @@ package body Ada.Containers.Bounded_Doubly_Linked_Lists is procedure Allocate (Container : in out List; - New_Node : out Count_Type); - - procedure Allocate - (Container : in out List; Stream : not null access Root_Stream_Type'Class; New_Node : out Count_Type); @@ -218,26 +214,6 @@ package body Ada.Containers.Bounded_Doubly_Linked_Lists is end if; end Allocate; - procedure Allocate - (Container : in out List; - New_Node : out Count_Type) - is - N : Node_Array renames Container.Nodes; - - begin - if Container.Free >= 0 then - New_Node := Container.Free; - Container.Free := N (New_Node).Next; - - else - -- As explained above, a negative free store value means that the - -- links for the nodes in the free store have not been initialized. - - New_Node := abs Container.Free; - Container.Free := Container.Free - 1; - end if; - end Allocate; - ------------ -- Append -- ------------ @@ -1145,40 +1121,17 @@ package body Ada.Containers.Bounded_Doubly_Linked_Lists is Position : out Cursor; Count : Count_Type := 1) is - New_Node : Count_Type; + New_Item : Element_Type; -- Default initialized. + pragma Warnings (Off, New_Item); begin - if Before.Container /= null then - if Before.Container /= Container'Unrestricted_Access then - raise Program_Error with - "Before cursor designates wrong list"; - end if; - - pragma Assert (Vet (Before), "bad cursor in Insert"); - end if; - - if Count = 0 then - Position := Before; - return; - end if; - - if Container.Length > Container.Capacity - Count then - raise Constraint_Error with "new length exceeds capacity"; - end if; - - if Container.Busy > 0 then - raise Program_Error with - "attempt to tamper with cursors (list is busy)"; - end if; - - Allocate (Container, New_Node => New_Node); - Insert_Internal (Container, Before.Node, New_Node); - Position := Cursor'(Container'Unchecked_Access, New_Node); + -- There is no explicit element provided, but in an instance the + -- element type may be a scalar with a Default_Value aspect, or a + -- composite type with such a scalar component, so we insert the + -- specified number of possibly initialized elements at the given + -- position. - for Index in Count_Type'(2) .. Count loop - Allocate (Container, New_Node => New_Node); - Insert_Internal (Container, Before.Node, New_Node); - end loop; + Insert (Container, Before, New_Item, Position, Count); end Insert; --------------------- diff --git a/gcc/ada/a-cbhama.adb b/gcc/ada/a-cbhama.adb index 3549f993935..88f9fa19058 100644 --- a/gcc/ada/a-cbhama.adb +++ b/gcc/ada/a-cbhama.adb @@ -556,15 +556,19 @@ package body Ada.Containers.Bounded_Hashed_Maps is ----------------- procedure Assign_Key (Node : in out Node_Type) is + New_Item : Element_Type; + pragma Warnings (Off, New_Item); + -- Default-initialized element (ok to reference, see below) + begin Node.Key := Key; - -- Note that we do not also assign the element component of the node - -- here, because this version of Insert does not accept an element - -- parameter. + -- There is no explicit element provided, but in an instance the + -- element type may be a scalar with a Default_Value aspect, or + -- a composite type with such a scalar component, so we insert + -- a possibly initialized element under the given key. - -- Node.Element := New_Item; - -- What is this deleted code about??? + Node.Element := New_Item; end Assign_Key; -------------- diff --git a/gcc/ada/a-cborma.adb b/gcc/ada/a-cborma.adb index f508fc5642c..1639998e845 100644 --- a/gcc/ada/a-cborma.adb +++ b/gcc/ada/a-cborma.adb @@ -826,20 +826,19 @@ package body Ada.Containers.Bounded_Ordered_Maps is ------------ procedure Assign (Node : in out Node_Type) is + New_Item : Element_Type; + pragma Warnings (Off, New_Item); + -- Default-initialized element (ok to reference, see below) + begin Node.Key := Key; - -- Were this insertion operation to accept an element parameter, this - -- is the point where the element value would be used, to update the - -- element component of the new node. However, this insertion - -- operation is special, in the sense that it does not accept an - -- element parameter. Rather, this version of Insert allocates a node - -- (inserting it among the active nodes of the container in the - -- normal way, with the node's position being determined by the Key), - -- and passes back a cursor designating the node. It is then up to - -- the caller to assign a value to the node's element. - - -- Node.Element := New_Item; + -- There is no explicit element provided, but in an instance the + -- element type may be a scalar with a Default_Value aspect, or + -- a composite type with such a scalar component, so we insert + -- a possibly initialized element under the given key. + + Node.Element := New_Item; end Assign; -------------- diff --git a/gcc/ada/a-chtgbk.adb b/gcc/ada/a-chtgbk.adb index 5f6bfa09106..941da83a493 100644 --- a/gcc/ada/a-chtgbk.adb +++ b/gcc/ada/a-chtgbk.adb @@ -53,6 +53,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is L := L - 1; return Result; + exception when others => B := B - 1; @@ -84,6 +85,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is L := L - 1; return Result; + exception when others => B := B - 1; @@ -285,6 +287,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is declare B : Natural renames HT.Busy; L : Natural renames HT.Lock; + begin B := B + 1; L := L + 1; @@ -293,6 +296,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is B := B - 1; L := L - 1; + exception when others => B := B - 1; diff --git a/gcc/ada/a-chtgbo.adb b/gcc/ada/a-chtgbo.adb index f3376cad1df..c455741fae8 100644 --- a/gcc/ada/a-chtgbo.adb +++ b/gcc/ada/a-chtgbo.adb @@ -54,6 +54,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is L := L - 1; return Result; + exception when others => B := B - 1; @@ -378,6 +379,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is L_Node := Next (L.Nodes (L_Node)); if L_Node = 0 then + -- We have exhausted the nodes in this bucket if N = 0 then @@ -402,6 +404,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is LR := LR - 1; return Result; + exception when others => BL := BL - 1; diff --git a/gcc/ada/a-chtgke.adb b/gcc/ada/a-chtgke.adb index e4de7712e7a..df7821d74b9 100644 --- a/gcc/ada/a-chtgke.adb +++ b/gcc/ada/a-chtgke.adb @@ -53,6 +53,7 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is L := L - 1; return Result; + exception when others => B := B - 1; @@ -84,6 +85,7 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is L := L - 1; return Result; + exception when others => B := B - 1; @@ -269,6 +271,7 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is declare B : Natural renames HT.Busy; L : Natural renames HT.Lock; + begin B := B + 1; L := L + 1; @@ -277,6 +280,7 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is B := B - 1; L := L - 1; + exception when others => B := B - 1; diff --git a/gcc/ada/a-chtgop.adb b/gcc/ada/a-chtgop.adb index a0e0af16493..4227c8f4483 100644 --- a/gcc/ada/a-chtgop.adb +++ b/gcc/ada/a-chtgop.adb @@ -145,6 +145,7 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is L := L - 1; return Result; + exception when others => B := B - 1; @@ -411,6 +412,7 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is LR := LR - 1; return Result; + exception when others => BL := BL - 1; @@ -738,12 +740,14 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is pragma Assert (L > 0); L := L - 1; end loop; + exception when others => + -- If there's an error computing a hash value during a - -- rehash, then AI-302 says the nodes "become lost." The + -- rehash, then AI-302 says the nodes "become lost." The -- issue is whether to actually deallocate these lost nodes, - -- since they might be designated by extant cursors. Here + -- since they might be designated by extant cursors. Here -- we decide to deallocate the nodes, since it's better to -- solve real problems (storage consumption) rather than -- imaginary ones (the user might, or might not, dereference diff --git a/gcc/ada/a-cidlli.adb b/gcc/ada/a-cidlli.adb index 04d0597a22c..f1fc3d3beb2 100644 --- a/gcc/ada/a-cidlli.adb +++ b/gcc/ada/a-cidlli.adb @@ -609,6 +609,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is when others => B := B - 1; L := L - 1; + raise; end; end Find; @@ -746,6 +747,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is when others => B := B - 1; L := L - 1; + raise; end Is_Sorted; @@ -945,10 +947,12 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is B := B - 1; L := L - 1; + exception when others => B := B - 1; L := L - 1; + raise; end; @@ -1753,6 +1757,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is when others => B := B - 1; L := L - 1; + raise; end; end Reverse_Find; diff --git a/gcc/ada/a-cihama.adb b/gcc/ada/a-cihama.adb index 41a5eb1ef53..7f9978935d9 100644 --- a/gcc/ada/a-cihama.adb +++ b/gcc/ada/a-cihama.adb @@ -308,11 +308,9 @@ package body Ada.Containers.Indefinite_Hashed_Maps is function Copy_Node (Node : Node_Access) return Node_Access is K : Key_Access := new Key_Type'(Node.Key.all); E : Element_Access; - begin E := new Element_Type'(Node.Element.all); return new Node_Type'(K, E, null); - exception when others => Free_Key (K); @@ -603,6 +601,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is begin Free_Key (X.Key); + exception when others => X.Key := null; @@ -623,7 +622,6 @@ package body Ada.Containers.Indefinite_Hashed_Maps is exception when others => X.Element := null; - Deallocate (X); raise; end; @@ -979,10 +977,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is begin Process (K, E); + exception when others => L := L - 1; B := B - 1; + raise; end; diff --git a/gcc/ada/a-cihase.adb b/gcc/ada/a-cihase.adb index bbd29e552ec..87c4ac47d5c 100644 --- a/gcc/ada/a-cihase.adb +++ b/gcc/ada/a-cihase.adb @@ -471,6 +471,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is begin Bucket := new Node_Type'(Tgt, Bucket); + exception when others => Free_Element (Tgt); @@ -485,6 +486,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is begin Iterate (Left.HT); + exception when others => HT_Ops.Free_Hash_Table (Buckets); @@ -774,6 +776,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is begin Free_Element (X.Element); + exception when others => X.Element := null; @@ -1021,6 +1024,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is begin Bucket := new Node_Type'(Tgt, Bucket); + exception when others => Free_Element (Tgt); @@ -1035,6 +1039,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is begin Iterate (Left.HT); + exception when others => HT_Ops.Free_Hash_Table (Buckets); @@ -1753,6 +1758,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is begin Iterate (Right_HT); + exception when others => HT_Ops.Free_Hash_Table (Buckets); @@ -1916,6 +1922,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is L := L - 1; B := B - 1; + exception when others => L := L - 1; @@ -1991,6 +1998,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is LL := LL - 1; LB := LB - 1; + exception when others => RL := RL - 1; @@ -2426,10 +2434,12 @@ package body Ada.Containers.Indefinite_Hashed_Sets is Indx := HT_Ops.Index (HT, Position.Node); Process (E); Eq := Equivalent_Keys (K, Key (E)); + exception when others => L := L - 1; B := B - 1; + raise; end; diff --git a/gcc/ada/a-cimutr.adb b/gcc/ada/a-cimutr.adb index 15f1640e867..2405a172eb8 100644 --- a/gcc/ada/a-cimutr.adb +++ b/gcc/ada/a-cimutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -2746,6 +2746,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is when others => L := L - 1; B := B - 1; + raise; end; end Update_Element; diff --git a/gcc/ada/a-ciorma.adb b/gcc/ada/a-ciorma.adb index 1c6f6d737fc..d62f6076ca0 100644 --- a/gcc/ada/a-ciorma.adb +++ b/gcc/ada/a-ciorma.adb @@ -455,6 +455,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is Color => Source.Color, Key => K, Element => E); + exception when others => Free_Key (K); @@ -966,6 +967,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin Local_Iterate (Container.Tree); + exception when others => B := B - 1; @@ -1305,7 +1307,6 @@ package body Ada.Containers.Indefinite_Ordered_Maps is declare K : Key_Type renames Position.Node.Key.all; E : Element_Type renames Position.Node.Element.all; - begin Process (K, E); exception @@ -1683,10 +1684,8 @@ package body Ada.Containers.Indefinite_Ordered_Maps is declare K : Key_Type renames Position.Node.Key.all; E : Element_Type renames Position.Node.Element.all; - begin Process (K, E); - exception when others => L := L - 1; diff --git a/gcc/ada/a-ciorse.adb b/gcc/ada/a-ciorse.adb index 2f8820cb952..b79d27e8b15 100644 --- a/gcc/ada/a-ciorse.adb +++ b/gcc/ada/a-ciorse.adb @@ -440,6 +440,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is Right => null, Color => Source.Color, Element => Element); + exception when others => Free_Element (Element); @@ -1908,6 +1909,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is when others => L := L - 1; B := B - 1; + raise; end; @@ -1960,6 +1962,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is when others => L := L - 1; B := B - 1; + raise; end; diff --git a/gcc/ada/a-cobove.adb b/gcc/ada/a-cobove.adb index b2e75b58118..28f6f4dd9ac 100644 --- a/gcc/ada/a-cobove.adb +++ b/gcc/ada/a-cobove.adb @@ -785,6 +785,7 @@ package body Ada.Containers.Bounded_Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Find; @@ -827,6 +828,7 @@ package body Ada.Containers.Bounded_Vectors is when others => B := B - 1; L := L - 1; + raise; end Find_Index; @@ -937,6 +939,7 @@ package body Ada.Containers.Bounded_Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Is_Sorted; @@ -1096,6 +1099,7 @@ package body Ada.Containers.Bounded_Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Sort; @@ -2492,10 +2496,12 @@ package body Ada.Containers.Bounded_Vectors is else return Cursor'(Container'Unrestricted_Access, Result); end if; + exception when others => B := B - 1; L := L - 1; + raise; end; end Reverse_Find; @@ -2541,6 +2547,7 @@ package body Ada.Containers.Bounded_Vectors is when others => B := B - 1; L := L - 1; + raise; end Reverse_Find_Index; diff --git a/gcc/ada/a-cohama.adb b/gcc/ada/a-cohama.adb index 541e95a14e6..70e7758c9d8 100644 --- a/gcc/ada/a-cohama.adb +++ b/gcc/ada/a-cohama.adb @@ -887,7 +887,6 @@ package body Ada.Containers.Hashed_Maps is declare K : Key_Type renames Position.Node.Key; E : Element_Type renames Position.Node.Element; - begin Process (K, E); exception @@ -1134,10 +1133,8 @@ package body Ada.Containers.Hashed_Maps is declare K : Key_Type renames Position.Node.Key; E : Element_Type renames Position.Node.Element; - begin Process (K, E); - exception when others => L := L - 1; diff --git a/gcc/ada/a-cohase.adb b/gcc/ada/a-cohase.adb index 6126db3a794..129ad6a7120 100644 --- a/gcc/ada/a-cohase.adb +++ b/gcc/ada/a-cohase.adb @@ -1208,7 +1208,6 @@ package body Ada.Containers.Hashed_Sets is return Node_Access is Node : Node_Access := new Node_Type; - begin Element_Type'Read (Stream, Node.Element); return Node; @@ -1522,6 +1521,7 @@ package body Ada.Containers.Hashed_Sets is begin Iterate (Left_HT); + exception when others => HT_Ops.Free_Hash_Table (Buckets); @@ -1563,6 +1563,7 @@ package body Ada.Containers.Hashed_Sets is begin Iterate (Right_HT); + exception when others => HT_Ops.Free_Hash_Table (Buckets); @@ -1718,6 +1719,7 @@ package body Ada.Containers.Hashed_Sets is L := L - 1; B := B - 1; + exception when others => L := L - 1; @@ -1785,6 +1787,7 @@ package body Ada.Containers.Hashed_Sets is LL := LL - 1; LB := LB - 1; + exception when others => RL := RL - 1; diff --git a/gcc/ada/a-coinve.adb b/gcc/ada/a-coinve.adb index 677fd97e09d..3234f5ec87a 100644 --- a/gcc/ada/a-coinve.adb +++ b/gcc/ada/a-coinve.adb @@ -543,6 +543,7 @@ package body Ada.Containers.Indefinite_Vectors is LR := LR - 1; return Result; + exception when others => BL := BL - 1; @@ -1280,6 +1281,7 @@ package body Ada.Containers.Indefinite_Vectors is when others => B := B - 1; L := L - 1; + raise; end Find_Index; @@ -1421,6 +1423,7 @@ package body Ada.Containers.Indefinite_Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Is_Sorted; @@ -1599,6 +1602,7 @@ package body Ada.Containers.Indefinite_Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Sort; diff --git a/gcc/ada/a-comutr.adb b/gcc/ada/a-comutr.adb index 426c6f0675b..01e7e1c809c 100644 --- a/gcc/ada/a-comutr.adb +++ b/gcc/ada/a-comutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1934,6 +1934,7 @@ package body Ada.Containers.Multiway_Trees is when others => L := L - 1; B := B - 1; + raise; end; end Query_Element; @@ -2723,6 +2724,7 @@ package body Ada.Containers.Multiway_Trees is when others => L := L - 1; B := B - 1; + raise; end; end Update_Element; diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb index 0f4bc19bcba..ef4d75494df 100644 --- a/gcc/ada/a-convec.adb +++ b/gcc/ada/a-convec.adb @@ -943,6 +943,7 @@ package body Ada.Containers.Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Find; @@ -985,6 +986,7 @@ package body Ada.Containers.Vectors is when others => B := B - 1; L := L - 1; + raise; end Find_Index; @@ -1095,6 +1097,7 @@ package body Ada.Containers.Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Is_Sorted; @@ -1257,6 +1260,7 @@ package body Ada.Containers.Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Sort; @@ -3288,6 +3292,7 @@ package body Ada.Containers.Vectors is when others => B := B - 1; L := L - 1; + raise; end; end Reverse_Find; @@ -3333,6 +3338,7 @@ package body Ada.Containers.Vectors is when others => B := B - 1; L := L - 1; + raise; end Reverse_Find_Index; diff --git a/gcc/ada/a-coorse.adb b/gcc/ada/a-coorse.adb index e7ac52b2325..675b40fcc39 100644 --- a/gcc/ada/a-coorse.adb +++ b/gcc/ada/a-coorse.adb @@ -1742,6 +1742,7 @@ package body Ada.Containers.Ordered_Sets is when others => L := L - 1; B := B - 1; + raise; end; @@ -1783,6 +1784,7 @@ package body Ada.Containers.Ordered_Sets is when others => L := L - 1; B := B - 1; + raise; end; diff --git a/gcc/ada/a-crbtgk.adb b/gcc/ada/a-crbtgk.adb index 7cc3b250c5a..ae8dd7c6c7a 100644 --- a/gcc/ada/a-crbtgk.adb +++ b/gcc/ada/a-crbtgk.adb @@ -77,6 +77,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => B := B - 1; L := L - 1; + raise; end Ceiling; @@ -136,6 +137,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => B := B - 1; L := L - 1; + raise; end Find; @@ -183,6 +185,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => B := B - 1; L := L - 1; + raise; end Floor; @@ -252,6 +255,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; @@ -297,6 +301,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; @@ -374,6 +379,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; @@ -419,6 +425,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; @@ -445,6 +452,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; @@ -483,6 +491,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; @@ -509,6 +518,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Keys is when others => L := L - 1; B := B - 1; + raise; end; diff --git a/gcc/ada/a-crbtgo.adb b/gcc/ada/a-crbtgo.adb index 1255ff59155..a75f069acb7 100644 --- a/gcc/ada/a-crbtgo.adb +++ b/gcc/ada/a-crbtgo.adb @@ -598,6 +598,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Operations is end loop; return Target_Root; + exception when others => Delete_Tree (Target_Root); diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 6f4f463ead8..4de43932dbe 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -7381,7 +7381,7 @@ pragma Warnings (On | Off, LOCAL_NAME [,REASON]); pragma Warnings (static_string_EXPRESSION [,REASON]); pragma Warnings (On | Off, static_string_EXPRESSION [,REASON]); -REASON ::= Reason => STRING_LITERAL {& STRING_LITERAL} +REASON ::= Reason => STRING_LITERAL @{& STRING_LITERAL@} @end smallexample @noindent diff --git a/gcc/ada/s-os_lib.ads b/gcc/ada/s-os_lib.ads index cd644964f1f..32a006eac56 100644 --- a/gcc/ada/s-os_lib.ads +++ b/gcc/ada/s-os_lib.ads @@ -802,10 +802,8 @@ package System.OS_Lib is -- Similar to the procedure above, but saves the output of the command to -- a file with the name Output_File. -- - -- Success is set to True if the command is executed and its output - -- successfully written to the file. Invalid_Pid is returned if the output - -- file could not be created or if the program could not be spawned - -- successfully. + -- Invalid_Pid is returned if the output file could not be created or if + -- the program could not be spawned successfully. -- -- Spawning processes from tasking programs is not recommended. See -- "NOTE: Spawn in tasking programs" below. diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index 9b8a3b2464e..87db5eee60d 100644 --- a/gcc/ada/sem_elab.adb +++ b/gcc/ada/sem_elab.adb @@ -1717,13 +1717,11 @@ package body Sem_Elab is Error_Msg_Sloc := Sloc (Ent); Error_Msg_NE - ("??elaboration code may access& before it is initialized", + ("??& can be accessed by clients before this initialization", N, Ent); Error_Msg_NE - ("\??suggest adding pragma Elaborate_Body to spec of &", - N, Scop); - Error_Msg_N - ("\??or an explicit initialization could be added #", N); + ("\??add Elaborate_Body to spec to ensure & is initialized", + N, Ent); end if; if not All_Errors_Mode then |