Commit d6e8719d by Robert Dewar Committed by Arnaud Charlet

checks.adb, [...]: Minor reformatting.

2014-07-30  Robert Dewar  <dewar@adacore.com>

	* checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
	a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
	a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
	reformatting.

From-SVN: r213280
parent 6b6bce61
2014-07-30 Robert Dewar <dewar@adacore.com>
* checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
reformatting.
2014-07-30 Ed Schonberg <schonberg@adacore.com> 2014-07-30 Ed Schonberg <schonberg@adacore.com>
* a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
......
...@@ -991,18 +991,17 @@ package body Ada.Containers.Bounded_Ordered_Sets is ...@@ -991,18 +991,17 @@ package body Ada.Containers.Bounded_Ordered_Sets is
L : Natural renames Container.Lock; L : Natural renames Container.Lock;
begin begin
return R : constant Reference_Type := return R : constant Reference_Type :=
(Element => N.Element'Access, (Element => N.Element'Access,
Control => Control =>
(Controlled with (Controlled with
Container => Container'Access, Container => Container'Access,
Pos => Position, Pos => Position,
Old_Key => new Key_Type'(Key (Position)))) Old_Key => new Key_Type'(Key (Position))))
do do
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
end return; end return;
end; end;
end Reference_Preserving_Key; end Reference_Preserving_Key;
function Reference_Preserving_Key function Reference_Preserving_Key
...@@ -1022,17 +1021,16 @@ package body Ada.Containers.Bounded_Ordered_Sets is ...@@ -1022,17 +1021,16 @@ package body Ada.Containers.Bounded_Ordered_Sets is
L : Natural renames Container.Lock; L : Natural renames Container.Lock;
begin begin
return R : constant Reference_Type := return R : constant Reference_Type :=
(Element => N.Element'Access, (Element => N.Element'Access,
Control => Control =>
(Controlled with (Controlled with
Container => Container'Access, Container => Container'Access,
Pos => Find (Container, Key), Pos => Find (Container, Key),
Old_Key => new Key_Type'(Key))) Old_Key => new Key_Type'(Key)))
do do
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
end return; end return;
end; end;
end Reference_Preserving_Key; end Reference_Preserving_Key;
......
...@@ -292,12 +292,10 @@ package Ada.Containers.Bounded_Ordered_Sets is ...@@ -292,12 +292,10 @@ package Ada.Containers.Bounded_Ordered_Sets is
Old_Key : Key_Access; Old_Key : Key_Access;
end record; end record;
overriding procedure overriding procedure Adjust (Control : in out Reference_Control_Type);
Adjust (Control : in out Reference_Control_Type);
pragma Inline (Adjust); pragma Inline (Adjust);
overriding procedure overriding procedure Finalize (Control : in out Reference_Control_Type);
Finalize (Control : in out Reference_Control_Type);
pragma Inline (Finalize); pragma Inline (Finalize);
type Reference_Type (Element : not null access Element_Type) is record type Reference_Type (Element : not null access Element_Type) is record
......
...@@ -209,6 +209,7 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is ...@@ -209,6 +209,7 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is
begin begin
Prev := HT.Buckets (Indx); Prev := HT.Buckets (Indx);
if Prev = X then if Prev = X then
HT.Buckets (Indx) := Next (Prev); HT.Buckets (Indx) := Next (Prev);
HT.Length := HT.Length - 1; HT.Length := HT.Length - 1;
...@@ -235,11 +236,11 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is ...@@ -235,11 +236,11 @@ package body Ada.Containers.Hash_Tables.Generic_Operations is
Free (X); Free (X);
return; return;
end if; end if;
Prev := Curr; Prev := Curr;
end loop; end loop;
end Delete_Node_At_Index;
end Delete_Node_At_Index
;
--------------------------- ---------------------------
-- Delete_Node_Sans_Free -- -- Delete_Node_Sans_Free --
--------------------------- ---------------------------
......
...@@ -129,10 +129,9 @@ package Ada.Containers.Hash_Tables.Generic_Operations is ...@@ -129,10 +129,9 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
-- deallocated. Program_Error is raised if the hash table is busy. -- deallocated. Program_Error is raised if the hash table is busy.
procedure Delete_Node_At_Index procedure Delete_Node_At_Index
(HT : in out Hash_Table_Type; (HT : in out Hash_Table_Type;
Indx : Hash_Type; Indx : Hash_Type;
X : in out Node_Access); X : in out Node_Access);
-- Delete a node whose bucket position is known. Used to remove a node -- Delete a node whose bucket position is known. Used to remove a node
-- whose element has been modified through a key_preserving reference. -- whose element has been modified through a key_preserving reference.
-- We cannot use the value of the element precisely because the current -- We cannot use the value of the element precisely because the current
...@@ -173,8 +172,9 @@ package Ada.Containers.Hash_Tables.Generic_Operations is ...@@ -173,8 +172,9 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
generic generic
use Ada.Streams; use Ada.Streams;
with function New_Node (Stream : not null access Root_Stream_Type'Class) with function New_Node
return Node_Access; (Stream : not null access Root_Stream_Type'Class)
return Node_Access;
procedure Generic_Read procedure Generic_Read
(Stream : not null access Root_Stream_Type'Class; (Stream : not null access Root_Stream_Type'Class;
HT : out Hash_Table_Type); HT : out Hash_Table_Type);
...@@ -184,7 +184,7 @@ package Ada.Containers.Hash_Tables.Generic_Operations is ...@@ -184,7 +184,7 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
function New_Buckets (Length : Hash_Type) return Buckets_Access; function New_Buckets (Length : Hash_Type) return Buckets_Access;
pragma Inline (New_Buckets); pragma Inline (New_Buckets);
-- Allocate a new Buckets_Type array with bounds 0..Length-1 -- Allocate a new Buckets_Type array with bounds 0 .. Length - 1
procedure Free_Buckets (Buckets : in out Buckets_Access); procedure Free_Buckets (Buckets : in out Buckets_Access);
pragma Inline (Free_Buckets); pragma Inline (Free_Buckets);
......
...@@ -2148,8 +2148,8 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2148,8 +2148,8 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
if Control.Container /= null then if Control.Container /= null then
declare declare
HT : Hash_Table_Type renames Control.Container.HT; HT : Hash_Table_Type renames Control.Container.HT;
B : Natural renames HT.Busy; B : Natural renames HT.Busy;
L : Natural renames HT.Lock; L : Natural renames HT.Lock;
begin begin
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
...@@ -2275,9 +2275,9 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2275,9 +2275,9 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
begin begin
if Control.Container /= null then if Control.Container /= null then
declare declare
HT : Hash_Table_Type renames Control.Container.HT; HT : Hash_Table_Type renames Control.Container.HT;
B : Natural renames HT.Busy; B : Natural renames HT.Busy;
L : Natural renames HT.Lock; L : Natural renames HT.Lock;
begin begin
B := B - 1; B := B - 1;
L := L - 1; L := L - 1;
...@@ -2285,7 +2285,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2285,7 +2285,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
if Hash (Key (Control.Old_Pos)) /= Control.Old_Hash then if Hash (Key (Control.Old_Pos)) /= Control.Old_Hash then
HT_Ops.Delete_Node_At_Index HT_Ops.Delete_Node_At_Index
(Control.Container.HT, Control.Index, Control.Old_Pos.Node); (Control.Container.HT, Control.Index, Control.Old_Pos.Node);
raise Program_Error; raise Program_Error;
end if; end if;
...@@ -2368,19 +2368,18 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2368,19 +2368,18 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
declare declare
HT : Hash_Table_Type renames Container.HT; HT : Hash_Table_Type renames Container.HT;
B : Natural renames HT.Busy; B : Natural renames HT.Busy;
L : Natural renames HT.Lock; L : Natural renames HT.Lock;
begin begin
return R : constant Reference_Type := return R : constant Reference_Type :=
(Element => Position.Node.Element.all'Access, (Element => Position.Node.Element.all'Access,
Control => Control =>
(Controlled with (Controlled with
Container => Container'Access, Container => Container'Access,
Index => HT_Ops.Index (HT, Position.Node), Index => HT_Ops.Index (HT, Position.Node),
Old_Pos => Position, Old_Pos => Position,
Old_Hash => Hash (Key (Position)))) Old_Hash => Hash (Key (Position))))
do do
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
end return; end return;
...@@ -2391,8 +2390,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2391,8 +2390,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
(Container : aliased in out Set; (Container : aliased in out Set;
Key : Key_Type) return Reference_Type Key : Key_Type) return Reference_Type
is is
Node : constant Node_Access := Node : constant Node_Access := Key_Keys.Find (Container.HT, Key);
Key_Keys.Find (Container.HT, Key);
begin begin
if Node = null then if Node = null then
...@@ -2405,19 +2403,18 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2405,19 +2403,18 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
declare declare
HT : Hash_Table_Type renames Container.HT; HT : Hash_Table_Type renames Container.HT;
B : Natural renames HT.Busy; B : Natural renames HT.Busy;
L : Natural renames HT.Lock; L : Natural renames HT.Lock;
P : constant Cursor := Find (Container, Key); P : constant Cursor := Find (Container, Key);
begin begin
return R : constant Reference_Type := return R : constant Reference_Type :=
(Element => Node.Element.all'Access, (Element => Node.Element.all'Access,
Control => Control =>
(Controlled with (Controlled with
Container => Container'Access, Container => Container'Access,
Index => HT_Ops.Index (HT, P.Node), Index => HT_Ops.Index (HT, P.Node),
Old_Pos => P, Old_Pos => P,
Old_Hash => Hash (Key))) Old_Hash => Hash (Key)))
do do
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
...@@ -2434,8 +2431,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is ...@@ -2434,8 +2431,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
Key : Key_Type; Key : Key_Type;
New_Item : Element_Type) New_Item : Element_Type)
is is
Node : constant Node_Access := Node : constant Node_Access := Key_Keys.Find (Container.HT, Key);
Key_Keys.Find (Container.HT, Key);
begin begin
if Node = null then if Node = null then
......
...@@ -442,16 +442,14 @@ package Ada.Containers.Indefinite_Hashed_Sets is ...@@ -442,16 +442,14 @@ package Ada.Containers.Indefinite_Hashed_Sets is
Old_Hash : Hash_Type; Old_Hash : Hash_Type;
end record; end record;
overriding procedure overriding procedure Adjust (Control : in out Reference_Control_Type);
Adjust (Control : in out Reference_Control_Type);
pragma Inline (Adjust); pragma Inline (Adjust);
overriding procedure overriding procedure Finalize (Control : in out Reference_Control_Type);
Finalize (Control : in out Reference_Control_Type);
pragma Inline (Finalize); pragma Inline (Finalize);
type Reference_Type (Element : not null access Element_Type) is record type Reference_Type (Element : not null access Element_Type) is record
Control : Reference_Control_Type; Control : Reference_Control_Type;
end record; end record;
use Ada.Streams; use Ada.Streams;
......
...@@ -2078,8 +2078,8 @@ package body Ada.Containers.Hashed_Sets is ...@@ -2078,8 +2078,8 @@ package body Ada.Containers.Hashed_Sets is
if Control.Container /= null then if Control.Container /= null then
declare declare
HT : Hash_Table_Type renames Control.Container.all.HT; HT : Hash_Table_Type renames Control.Container.all.HT;
B : Natural renames HT.Busy; B : Natural renames HT.Busy;
L : Natural renames HT.Lock; L : Natural renames HT.Lock;
begin begin
B := B - 1; B := B - 1;
L := L - 1; L := L - 1;
...@@ -2088,7 +2088,7 @@ package body Ada.Containers.Hashed_Sets is ...@@ -2088,7 +2088,7 @@ package body Ada.Containers.Hashed_Sets is
if Hash (Key (Element (Control.Old_Pos))) /= Control.Old_Hash if Hash (Key (Element (Control.Old_Pos))) /= Control.Old_Hash
then then
HT_Ops.Delete_Node_At_Index HT_Ops.Delete_Node_At_Index
(Control.Container.HT, Control.Index, Control.Old_Pos.Node); (Control.Container.HT, Control.Index, Control.Old_Pos.Node);
raise Program_Error with "key not preserved in reference"; raise Program_Error with "key not preserved in reference";
end if; end if;
...@@ -2106,13 +2106,12 @@ package body Ada.Containers.Hashed_Sets is ...@@ -2106,13 +2106,12 @@ package body Ada.Containers.Hashed_Sets is
is is
HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; HT : Hash_Table_Type renames Container'Unrestricted_Access.HT;
Node : constant Node_Access := Key_Keys.Find (HT, Key); Node : constant Node_Access := Key_Keys.Find (HT, Key);
begin begin
if Node = null then if Node = null then
return No_Element; return No_Element;
else
return Cursor'(Container'Unrestricted_Access, Node);
end if; end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Find; end Find;
--------- ---------
...@@ -2167,17 +2166,17 @@ package body Ada.Containers.Hashed_Sets is ...@@ -2167,17 +2166,17 @@ package body Ada.Containers.Hashed_Sets is
declare declare
HT : Hash_Table_Type renames Position.Container.all.HT; HT : Hash_Table_Type renames Position.Container.all.HT;
B : Natural renames HT.Busy; B : Natural renames HT.Busy;
L : Natural renames HT.Lock; L : Natural renames HT.Lock;
begin begin
return R : constant Reference_Type := return R : constant Reference_Type :=
(Element => Position.Node.Element'Access, (Element => Position.Node.Element'Access,
Control => Control =>
(Controlled with (Controlled with
Container'Unrestricted_Access, Container'Unrestricted_Access,
Index => HT_Ops.Index (HT, Position.Node), Index => HT_Ops.Index (HT, Position.Node),
Old_Pos => Position, Old_Pos => Position,
Old_Hash => Hash (Key (Position)))) Old_Hash => Hash (Key (Position))))
do do
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
...@@ -2203,13 +2202,13 @@ package body Ada.Containers.Hashed_Sets is ...@@ -2203,13 +2202,13 @@ package body Ada.Containers.Hashed_Sets is
P : constant Cursor := Find (Container, Key); P : constant Cursor := Find (Container, Key);
begin begin
return R : constant Reference_Type := return R : constant Reference_Type :=
(Element => Node.Element'Access, (Element => Node.Element'Access,
Control => Control =>
(Controlled with (Controlled with
Container'Unrestricted_Access, Container'Unrestricted_Access,
Index => HT_Ops.Index (HT, P.Node), Index => HT_Ops.Index (HT, P.Node),
Old_Pos => P, Old_Pos => P,
Old_Hash => Hash (Key))) Old_Hash => Hash (Key)))
do do
B := B + 1; B := B + 1;
L := L + 1; L := L + 1;
......
...@@ -49,12 +49,16 @@ is ...@@ -49,12 +49,16 @@ is
pragma Import (Ada, Exception_Message_Length, "__gnat_exception_msg_len"); pragma Import (Ada, Exception_Message_Length, "__gnat_exception_msg_len");
procedure Append_Info_Exception_Message procedure Append_Info_Exception_Message
(X : Exception_Occurrence; Info : in out String; Ptr : in out Natural); (X : Exception_Occurrence;
Info : in out String;
Ptr : in out Natural);
pragma Import pragma Import
(Ada, Append_Info_Exception_Message, "__gnat_append_info_e_msg"); (Ada, Append_Info_Exception_Message, "__gnat_append_info_e_msg");
procedure Append_Info_Untailored_Exception_Information procedure Append_Info_Untailored_Exception_Information
(X : Exception_Occurrence; Info : in out String; Ptr : in out Natural); (X : Exception_Occurrence;
Info : in out String;
Ptr : in out Natural);
pragma Import pragma Import
(Ada, Append_Info_Untailored_Exception_Information, (Ada, Append_Info_Untailored_Exception_Information,
"__gnat_append_info_u_e_info"); "__gnat_append_info_u_e_info");
......
...@@ -74,14 +74,14 @@ package body Ada.Exceptions is ...@@ -74,14 +74,14 @@ package body Ada.Exceptions is
-- These procedures are used to provide exclusion bounds in -- These procedures are used to provide exclusion bounds in
-- calls to Call_Chain at exception raise points from this unit. The -- calls to Call_Chain at exception raise points from this unit. The
-- purpose is to arrange for the exception tracebacks not to include -- purpose is to arrange for the exception tracebacks not to include
-- frames from routines involved in the raise process, as these are -- frames from subprograms involved in the raise process, as these are
-- meaningless from the user's standpoint. -- meaningless from the user's standpoint.
-- --
-- For these bounds to be meaningful, we need to ensure that the object -- For these bounds to be meaningful, we need to ensure that the object
-- code for the routines involved in processing a raise is located after -- code for the subprograms involved in processing a raise is located
-- the object code Code_Address_For_AAA and before the object code -- after the object code Code_Address_For_AAA and before the object
-- Code_Address_For_ZZZ. This will indeed be the case as long as the -- code Code_Address_For_ZZZ. This will indeed be the case as long as
-- following rules are respected: -- the following rules are respected:
-- --
-- 1) The bodies of the subprograms involved in processing a raise -- 1) The bodies of the subprograms involved in processing a raise
-- are located after the body of Code_Address_For_AAA and before the -- are located after the body of Code_Address_For_AAA and before the
...@@ -111,9 +111,9 @@ package body Ada.Exceptions is ...@@ -111,9 +111,9 @@ package body Ada.Exceptions is
package Exception_Data is package Exception_Data is
--------------------------------- -----------------------------------
-- Exception messages routines -- -- Exception Message Subprograms --
--------------------------------- -----------------------------------
procedure Set_Exception_C_Msg procedure Set_Exception_C_Msg
(Excep : EOA; (Excep : EOA;
...@@ -139,7 +139,7 @@ package body Ada.Exceptions is ...@@ -139,7 +139,7 @@ package body Ada.Exceptions is
-- which is generated as the exception message. -- which is generated as the exception message.
--------------------------------------- ---------------------------------------
-- Exception information subprograms -- -- Exception Information Subprograms --
--------------------------------------- ---------------------------------------
function Untailored_Exception_Information function Untailored_Exception_Information
...@@ -164,17 +164,17 @@ package body Ada.Exceptions is ...@@ -164,17 +164,17 @@ package body Ada.Exceptions is
-- --
-- The Exception_Name and Message lines are omitted in the abort -- The Exception_Name and Message lines are omitted in the abort
-- signal case, since this is not really an exception. -- signal case, since this is not really an exception.
--
-- Note: If the format of the generated string is changed, please note -- Note: If the format of the generated string is changed, please note
-- that an equivalent modification to the routine String_To_EO must be -- that an equivalent modification to the routine String_To_EO must be
-- made to preserve proper functioning of the stream attributes. -- made to preserve proper functioning of the stream attributes.
--
-- What is automatically output when exception tracing is on is the -- What is automatically output when exception tracing is on is the
-- usual exception information with the call chain backtrace possibly -- usual exception information with the call chain backtrace possibly
-- tailored by a backtrace decorator. Modifying Exception_Information -- tailored by a backtrace decorator. Modifying Exception_Information
-- itself is not a good idea because the decorated output is completely -- itself is not a good idea because the decorated output is completely
-- out of control and would break all our code related to the streaming -- out of control and would break all our code related to the streaming
-- of exceptions. We then provide an alternative function to compute -- of exceptions. We then provide an alternative function to compute
-- the possibly tailored output, which is equivalent if no decorator is -- the possibly tailored output, which is equivalent if no decorator is
-- currently set: -- currently set:
...@@ -195,9 +195,9 @@ package body Ada.Exceptions is ...@@ -195,9 +195,9 @@ package body Ada.Exceptions is
package Exception_Traces is package Exception_Traces is
---------------------------------------------- -------------------------------------------------
-- Run-Time Exception Notification Routines -- -- Run-Time Exception Notification Subprograms --
---------------------------------------------- -------------------------------------------------
-- These subprograms provide a common run-time interface to trigger the -- These subprograms provide a common run-time interface to trigger the
-- actions required when an exception is about to be propagated (e.g. -- actions required when an exception is about to be propagated (e.g.
...@@ -229,9 +229,9 @@ package body Ada.Exceptions is ...@@ -229,9 +229,9 @@ package body Ada.Exceptions is
package Exception_Propagation is package Exception_Propagation is
------------------------------------ ---------------------------------------
-- Exception propagation routines -- -- Exception Propagation Subprograms --
------------------------------------ ---------------------------------------
function Allocate_Occurrence return EOA; function Allocate_Occurrence return EOA;
-- Allocate an exception occurence (as well as the machine occurence) -- Allocate an exception occurence (as well as the machine occurence)
...@@ -244,9 +244,9 @@ package body Ada.Exceptions is ...@@ -244,9 +244,9 @@ package body Ada.Exceptions is
package Stream_Attributes is package Stream_Attributes is
-------------------------------- ----------------------------------
-- Stream attributes routines -- -- Stream Attribute Subprograms --
-------------------------------- ----------------------------------
function EId_To_String (X : Exception_Id) return String; function EId_To_String (X : Exception_Id) return String;
function String_To_EId (S : String) return Exception_Id; function String_To_EId (S : String) return Exception_Id;
...@@ -392,11 +392,11 @@ package body Ada.Exceptions is ...@@ -392,11 +392,11 @@ package body Ada.Exceptions is
-- Source as an exception to be propagated in the caller task. Target is -- Source as an exception to be propagated in the caller task. Target is
-- expected to be a pointer to the fixed TSD occurrence for this task. -- expected to be a pointer to the fixed TSD occurrence for this task.
----------------------------- --------------------------------
-- Run-Time Check Routines -- -- Run-Time Check Subprograms --
----------------------------- --------------------------------
-- These routines raise a specific exception with a reason message -- These subprograms raise a specific exception with a reason message
-- attached. The parameters are the file name and line number in each -- attached. The parameters are the file name and line number in each
-- case. The names are defined by Exp_Ch11.Get_RT_Exception_Name. -- case. The names are defined by Exp_Ch11.Get_RT_Exception_Name.
...@@ -486,7 +486,7 @@ package body Ada.Exceptions is ...@@ -486,7 +486,7 @@ package body Ada.Exceptions is
-- This routine is separated out because it has quite different behavior -- This routine is separated out because it has quite different behavior
-- from the others. This is the "finalize/adjust raised exception". This -- from the others. This is the "finalize/adjust raised exception". This
-- subprogram is always called with abort deferred, unlike all other -- subprogram is always called with abort deferred, unlike all other
-- Rcheck_* routines, it needs to call Raise_Exception_No_Defer. -- Rcheck_* subprograms, it needs to call Raise_Exception_No_Defer.
pragma Export (C, Rcheck_CE_Access_Check, pragma Export (C, Rcheck_CE_Access_Check,
"__gnat_rcheck_CE_Access_Check"); "__gnat_rcheck_CE_Access_Check");
...@@ -1207,9 +1207,9 @@ package body Ada.Exceptions is ...@@ -1207,9 +1207,9 @@ package body Ada.Exceptions is
Complete_And_Propagate_Occurrence (Excep); Complete_And_Propagate_Occurrence (Excep);
end Raise_With_Msg; end Raise_With_Msg;
-------------------------------------- -----------------------------------------
-- Calls to Run-Time Check Routines -- -- Calls to Run-Time Check Subprograms --
-------------------------------------- -----------------------------------------
procedure Rcheck_CE_Access_Check procedure Rcheck_CE_Access_Check
(File : System.Address; Line : Integer) (File : System.Address; Line : Integer)
...@@ -1474,9 +1474,9 @@ package body Ada.Exceptions is ...@@ -1474,9 +1474,9 @@ package body Ada.Exceptions is
(File : System.Address; Line, Column, Index, First, Last : Integer) (File : System.Address; Line, Column, Index, First, Last : Integer)
is is
Msg : constant String := Msg : constant String :=
Rmsg_05 (Rmsg_05'First .. Rmsg_05'Last - 1) & ASCII.LF & Rmsg_05 (Rmsg_05'First .. Rmsg_05'Last - 1) & ASCII.LF
"index " & Image (Index) & " not in " & Image (First) & & "index " & Image (Index) & " not in " & Image (First)
".." & Image (Last) & ASCII.NUL; & ".." & Image (Last) & ASCII.NUL;
begin begin
Raise_Constraint_Error_Msg (File, Line, Column, Msg'Address); Raise_Constraint_Error_Msg (File, Line, Column, Msg'Address);
end Rcheck_CE_Index_Check_Ext; end Rcheck_CE_Index_Check_Ext;
...@@ -1485,9 +1485,9 @@ package body Ada.Exceptions is ...@@ -1485,9 +1485,9 @@ package body Ada.Exceptions is
(File : System.Address; Line, Column, Index, First, Last : Integer) (File : System.Address; Line, Column, Index, First, Last : Integer)
is is
Msg : constant String := Msg : constant String :=
Rmsg_06 (Rmsg_06'First .. Rmsg_06'Last - 1) & ASCII.LF & Rmsg_06 (Rmsg_06'First .. Rmsg_06'Last - 1) & ASCII.LF
"value " & Image (Index) & " not in " & Image (First) & & "value " & Image (Index) & " not in " & Image (First)
".." & Image (Last) & ASCII.NUL; & ".." & Image (Last) & ASCII.NUL;
begin begin
Raise_Constraint_Error_Msg (File, Line, Column, Msg'Address); Raise_Constraint_Error_Msg (File, Line, Column, Msg'Address);
end Rcheck_CE_Invalid_Data_Ext; end Rcheck_CE_Invalid_Data_Ext;
...@@ -1496,9 +1496,9 @@ package body Ada.Exceptions is ...@@ -1496,9 +1496,9 @@ package body Ada.Exceptions is
(File : System.Address; Line, Column, Index, First, Last : Integer) (File : System.Address; Line, Column, Index, First, Last : Integer)
is is
Msg : constant String := Msg : constant String :=
Rmsg_12 (Rmsg_12'First .. Rmsg_12'Last - 1) & ASCII.LF & Rmsg_12 (Rmsg_12'First .. Rmsg_12'Last - 1) & ASCII.LF
"value " & Image (Index) & " not in " & Image (First) & & "value " & Image (Index) & " not in " & Image (First)
".." & Image (Last) & ASCII.NUL; & ".." & Image (Last) & ASCII.NUL;
begin begin
Raise_Constraint_Error_Msg (File, Line, Column, Msg'Address); Raise_Constraint_Error_Msg (File, Line, Column, Msg'Address);
end Rcheck_CE_Range_Check_Ext; end Rcheck_CE_Range_Check_Ext;
...@@ -1510,7 +1510,7 @@ package body Ada.Exceptions is ...@@ -1510,7 +1510,7 @@ package body Ada.Exceptions is
begin begin
-- This is "finalize/adjust raised exception". This subprogram is always -- This is "finalize/adjust raised exception". This subprogram is always
-- called with abort deferred, unlike all other Rcheck_* routines, it -- called with abort deferred, unlike all other Rcheck_* subprograms, it
-- needs to call Raise_Exception_No_Defer. -- needs to call Raise_Exception_No_Defer.
-- This is consistent with Raise_From_Controlled_Operation -- This is consistent with Raise_From_Controlled_Operation
......
...@@ -88,9 +88,9 @@ package body Ada.Exceptions is ...@@ -88,9 +88,9 @@ package body Ada.Exceptions is
package Exception_Data is package Exception_Data is
--------------------------------- -----------------------------------
-- Exception messages routines -- -- Exception Message Subprograms --
--------------------------------- -----------------------------------
procedure Set_Exception_C_Msg procedure Set_Exception_C_Msg
(Excep : EOA; (Excep : EOA;
...@@ -117,7 +117,7 @@ package body Ada.Exceptions is ...@@ -117,7 +117,7 @@ package body Ada.Exceptions is
-- message. -- message.
--------------------------------------- ---------------------------------------
-- Exception information subprograms -- -- Exception Information Subprograms --
--------------------------------------- ---------------------------------------
function Untailored_Exception_Information function Untailored_Exception_Information
...@@ -142,17 +142,17 @@ package body Ada.Exceptions is ...@@ -142,17 +142,17 @@ package body Ada.Exceptions is
-- --
-- The Exception_Name and Message lines are omitted in the abort -- The Exception_Name and Message lines are omitted in the abort
-- signal case, since this is not really an exception. -- signal case, since this is not really an exception.
--
-- Note: If the format of the generated string is changed, please note -- Note: If the format of the generated string is changed, please note
-- that an equivalent modification to the routine String_To_EO must be -- that an equivalent modification to the routine String_To_EO must be
-- made to preserve proper functioning of the stream attributes. -- made to preserve proper functioning of the stream attributes.
--
-- What is automatically output when exception tracing is on is the -- What is automatically output when exception tracing is on is the
-- usual exception information with the call chain backtrace possibly -- usual exception information with the call chain backtrace possibly
-- tailored by a backtrace decorator. Modifying Exception_Information -- tailored by a backtrace decorator. Modifying Exception_Information
-- itself is not a good idea because the decorated output is completely -- itself is not a good idea because the decorated output is completely
-- out of control and would break all our code related to the streaming -- out of control and would break all our code related to the streaming
-- of exceptions. We then provide an alternative function to compute -- of exceptions. We then provide an alternative function to compute
-- the possibly tailored output, which is equivalent if no decorator is -- the possibly tailored output, which is equivalent if no decorator is
-- currently set: -- currently set:
...@@ -173,9 +173,9 @@ package body Ada.Exceptions is ...@@ -173,9 +173,9 @@ package body Ada.Exceptions is
package Exception_Traces is package Exception_Traces is
---------------------------------------------- -------------------------------------------------
-- Run-Time Exception Notification Routines -- -- Run-Time Exception Notification Subprograms --
---------------------------------------------- -------------------------------------------------
-- These subprograms provide a common run-time interface to trigger the -- These subprograms provide a common run-time interface to trigger the
-- actions required when an exception is about to be propagated (e.g. -- actions required when an exception is about to be propagated (e.g.
...@@ -207,9 +207,9 @@ package body Ada.Exceptions is ...@@ -207,9 +207,9 @@ package body Ada.Exceptions is
package Stream_Attributes is package Stream_Attributes is
-------------------------------- ----------------------------------
-- Stream attributes routines -- -- Stream Attribute Subprograms --
-------------------------------- ----------------------------------
function EId_To_String (X : Exception_Id) return String; function EId_To_String (X : Exception_Id) return String;
function String_To_EId (S : String) return Exception_Id; function String_To_EId (S : String) return Exception_Id;
...@@ -232,7 +232,8 @@ package body Ada.Exceptions is ...@@ -232,7 +232,8 @@ package body Ada.Exceptions is
-- about it. -- about it.
procedure Raise_Exception_No_Defer procedure Raise_Exception_No_Defer
(E : Exception_Id; Message : String := ""); (E : Exception_Id;
Message : String := "");
pragma Export pragma Export
(Ada, Raise_Exception_No_Defer, (Ada, Raise_Exception_No_Defer,
"ada__exceptions__raise_exception_no_defer"); "ada__exceptions__raise_exception_no_defer");
...@@ -346,18 +347,18 @@ package body Ada.Exceptions is ...@@ -346,18 +347,18 @@ package body Ada.Exceptions is
-- caller task. Target is expected to be a pointer to the fixed TSD -- caller task. Target is expected to be a pointer to the fixed TSD
-- occurrence for this task. -- occurrence for this task.
----------------------------- --------------------------------
-- Run-Time Check Routines -- -- Run-Time Check Subprograms --
----------------------------- --------------------------------
-- These routines raise a specific exception with a reason message -- These subprograms raise a specific exception with a reason message
-- attached. The parameters are the file name and line number in each -- attached. The parameters are the file name and line number in each
-- case. The names are defined by Exp_Ch11.Get_RT_Exception_Name. -- case. The names are defined by Exp_Ch11.Get_RT_Exception_Name.
-- Note on ordering of these routines. Normally in the Ada.Exceptions units -- Note on ordering of these subprograms. Normally in the Ada.Exceptions
-- we don't care about the ordering of entries for Rcheck routines, and -- units we do not care about the ordering of entries for Rcheck
-- the normal approach is to keep them in the same order as declarations -- subprograms, and the normal approach is to keep them in the same
-- in Types. -- order as declarations in Types.
-- This section is an IMPORTANT EXCEPTION. It is required by the .Net -- This section is an IMPORTANT EXCEPTION. It is required by the .Net
-- runtime that the routine Rcheck_PE_Finalize_Raise_Exception is at the -- runtime that the routine Rcheck_PE_Finalize_Raise_Exception is at the
...@@ -443,7 +444,7 @@ package body Ada.Exceptions is ...@@ -443,7 +444,7 @@ package body Ada.Exceptions is
-- This routine is separated out because it has quite different behavior -- This routine is separated out because it has quite different behavior
-- from the others. This is the "finalize/adjust raised exception". This -- from the others. This is the "finalize/adjust raised exception". This
-- subprogram is always called with abort deferred, unlike all other -- subprogram is always called with abort deferred, unlike all other
-- Rcheck_* routines, it needs to call Raise_Exception_No_Defer. -- Rcheck_* subprograms, it needs to call Raise_Exception_No_Defer.
pragma Export (C, Rcheck_CE_Access_Check, pragma Export (C, Rcheck_CE_Access_Check,
"__gnat_rcheck_CE_Access_Check"); "__gnat_rcheck_CE_Access_Check");
...@@ -1184,9 +1185,9 @@ package body Ada.Exceptions is ...@@ -1184,9 +1185,9 @@ package body Ada.Exceptions is
Raise_Current_Excep (E); Raise_Current_Excep (E);
end Raise_With_Msg; end Raise_With_Msg;
-------------------------------------- -----------------------------------------
-- Calls to Run-Time Check Routines -- -- Calls to Run-Time Check Subprograms --
-------------------------------------- -----------------------------------------
procedure Rcheck_CE_Access_Check procedure Rcheck_CE_Access_Check
(File : System.Address; Line : Integer) (File : System.Address; Line : Integer)
...@@ -1445,10 +1446,11 @@ package body Ada.Exceptions is ...@@ -1445,10 +1446,11 @@ package body Ada.Exceptions is
is is
E : constant Exception_Id := Program_Error_Def'Access; E : constant Exception_Id := Program_Error_Def'Access;
Excep : constant EOA := Get_Current_Excep.all; Excep : constant EOA := Get_Current_Excep.all;
begin begin
-- This is "finalize/adjust raised exception". This subprogram is always -- This is "finalize/adjust raised exception". This subprogram is always
-- called with abort deferred, unlike all other Rcheck_* routines, it -- called with abort deferred, unlike all other Rcheck_* subprograms,
-- needs to call Raise_Exception_No_Defer. -- itneeds to call Raise_Exception_No_Defer.
-- This is consistent with Raise_From_Controlled_Operation -- This is consistent with Raise_From_Controlled_Operation
......
...@@ -4705,6 +4705,7 @@ package body Checks is ...@@ -4705,6 +4705,7 @@ package body Checks is
else else
OK := False; OK := False;
end if; end if;
return; return;
end if; end if;
...@@ -5100,7 +5101,7 @@ package body Checks is ...@@ -5100,7 +5101,7 @@ package body Checks is
--------------------------- ---------------------------
procedure Enable_Overflow_Check (N : Node_Id) is procedure Enable_Overflow_Check (N : Node_Id) is
Typ : constant Entity_Id := Base_Type (Etype (N)); Typ : constant Entity_Id := Base_Type (Etype (N));
Mode : constant Overflow_Mode_Type := Overflow_Check_Mode; Mode : constant Overflow_Mode_Type := Overflow_Check_Mode;
Chk : Nat; Chk : Nat;
OK : Boolean; OK : Boolean;
......
...@@ -5361,8 +5361,8 @@ package body Exp_Aggr is ...@@ -5361,8 +5361,8 @@ package body Exp_Aggr is
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => Target, Name => Target,
Expression => New_Copy (N))); Expression => New_Copy (N)));
else
else
Aggr_Code := Aggr_Code :=
Build_Array_Aggr_Code (N, Build_Array_Aggr_Code (N,
Ctype => Ctyp, Ctype => Ctyp,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment