aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2011-09-01 10:45:53 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-01 12:45:53 +0200
commit3040dbd48e3f11838cbe6e7d21524f903f7d3a01 (patch)
tree892d0ab6c59f3522d24d88163f798cdad74fa727
parentfecbd77922c9772bb2823e111991349e0657241a (diff)
downloadgcc-3040dbd48e3f11838cbe6e7d21524f903f7d3a01.zip
gcc-3040dbd48e3f11838cbe6e7d21524f903f7d3a01.tar.gz
gcc-3040dbd48e3f11838cbe6e7d21524f903f7d3a01.tar.bz2
exp_ch4.adb, [...]: Minor reformatting.
2011-09-01 Robert Dewar <dewar@adacore.com> * exp_ch4.adb, a-exexda.adb: Minor reformatting. From-SVN: r178402
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/a-exexda.adb24
-rw-r--r--gcc/ada/exp_ch4.adb19
3 files changed, 27 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 57191fa..46e33de 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,9 @@
2011-09-01 Robert Dewar <dewar@adacore.com>
+ * exp_ch4.adb, a-exexda.adb: Minor reformatting.
+
+2011-09-01 Robert Dewar <dewar@adacore.com>
+
* s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2011-09-01 Thomas Quinot <quinot@adacore.com>
diff --git a/gcc/ada/a-exexda.adb b/gcc/ada/a-exexda.adb
index 69a1acc..37cb115 100644
--- a/gcc/ada/a-exexda.adb
+++ b/gcc/ada/a-exexda.adb
@@ -433,7 +433,8 @@ package body Exception_Data is
------------------------------
function Exception_Info_Maxlength
- (X : Exception_Occurrence) return Natural is
+ (X : Exception_Occurrence) return Natural
+ is
begin
return
Basic_Exception_Info_Maxlength (X)
@@ -447,14 +448,15 @@ package body Exception_Data is
procedure Append_Info_Exception_Message
(X : Exception_Occurrence;
Info : in out String;
- Ptr : in out Natural) is
+ Ptr : in out Natural)
+ is
begin
if X.Id = Null_Id then
raise Constraint_Error;
end if;
declare
- Len : constant Natural := Exception_Message_Length (X);
+ Len : constant Natural := Exception_Message_Length (X);
Msg : constant String (1 .. Len) := X.Msg (1 .. Len);
begin
Append_Info_String (Msg, Info, Ptr);
@@ -476,7 +478,7 @@ package body Exception_Data is
end if;
declare
- Len : constant Natural := Exception_Name_Length (Id);
+ Len : constant Natural := Exception_Name_Length (Id);
Name : constant String (1 .. Len) := To_Ptr (Id.Full_Name) (1 .. Len);
begin
Append_Info_String (Name, Info, Ptr);
@@ -497,7 +499,8 @@ package body Exception_Data is
---------------------------
function Exception_Name_Length
- (Id : Exception_Id) return Natural is
+ (Id : Exception_Id) return Natural
+ is
begin
-- What is stored in the internal Name buffer includes a terminating
-- null character that we never care about.
@@ -516,7 +519,8 @@ package body Exception_Data is
------------------------------
function Exception_Message_Length
- (X : Exception_Occurrence) return Natural is
+ (X : Exception_Occurrence) return Natural
+ is
begin
return X.Msg_Length;
end Exception_Message_Length;
@@ -530,7 +534,6 @@ package body Exception_Data is
is
Info : aliased String (1 .. Basic_Exception_Tback_Maxlength (X));
Ptr : Natural := Info'First - 1;
-
begin
Append_Info_Basic_Exception_Traceback (X, Info, Ptr);
return Info (Info'First .. Ptr);
@@ -545,7 +548,6 @@ package body Exception_Data is
is
Info : String (1 .. Exception_Info_Maxlength (X));
Ptr : Natural := Info'First - 1;
-
begin
Append_Info_Exception_Information (X, Info, Ptr);
return Info (Info'First .. Ptr);
@@ -596,9 +598,9 @@ package body Exception_Data is
if Excep.Msg_Length <= Exception_Msg_Max_Length - Size then
Excep.Msg (Excep.Msg_Length + 1) := ':';
Excep.Msg_Length := Excep.Msg_Length + Size;
+
Val := Number;
Size := 0;
-
while Val > 0 loop
Remind := Val rem 10;
Val := Val / 10;
@@ -658,8 +660,7 @@ package body Exception_Data is
Len : constant Natural :=
Natural'Min (Message'Length, Exception_Msg_Max_Length);
First : constant Integer := Message'First;
- Excep : constant EOA := Get_Current_Excep.all;
-
+ Excep : constant EOA := Get_Current_Excep.all;
begin
Excep.Exception_Raised := False;
Excep.Msg_Length := Len;
@@ -667,7 +668,6 @@ package body Exception_Data is
Excep.Id := Id;
Excep.Num_Tracebacks := 0;
Excep.Pid := Local_Partition_ID;
-
end Set_Exception_Msg;
----------------------------------
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 00ebdbb..218c94d 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -4428,11 +4428,12 @@ package body Exp_Ch4 is
-------------------------
function Find_Insertion_Node return Node_Id is
- Par : Node_Id := N;
+ Par : Node_Id;
begin
-- Climb up the branches of a complex if statement
+ Par := N;
while Nkind_In (Parent (Par), N_And_Then, N_Op_Not, N_Or_Else) loop
Par := Parent (Par);
end loop;
@@ -4440,6 +4441,8 @@ package body Exp_Ch4 is
return Par;
end Find_Insertion_Node;
+ -- Local variables
+
Ins_Nod : constant Node_Id := Find_Insertion_Node;
Loc : constant Source_Ptr := Sloc (Decl);
Obj_Id : constant Entity_Id := Defining_Identifier (Decl);
@@ -4452,8 +4455,8 @@ package body Exp_Ch4 is
Temp_Id : Node_Id;
begin
- -- Step 1: Create the access type which provides a reference to
- -- the transient object.
+ -- Step 1: Create the access type which provides a reference to the
+ -- transient object.
if Is_Access_Type (Obj_Typ) then
Desig_Typ := Directly_Designated_Type (Obj_Typ);
@@ -4469,11 +4472,11 @@ package body Exp_Ch4 is
Ptr_Decl :=
Make_Full_Type_Declaration (Loc,
Defining_Identifier => Ptr_Id,
- Type_Definition =>
- Make_Access_To_Object_Definition (Loc,
- All_Present =>
- Ekind (Obj_Typ) = E_General_Access_Type,
- Subtype_Indication => New_Reference_To (Desig_Typ, Loc)));
+ Type_Definition =>
+ Make_Access_To_Object_Definition (Loc,
+ All_Present =>
+ Ekind (Obj_Typ) = E_General_Access_Type,
+ Subtype_Indication => New_Reference_To (Desig_Typ, Loc)));
Insert_Action (Ins_Nod, Ptr_Decl);
Analyze (Ptr_Decl);