aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_dist.adb26
-rw-r--r--gcc/ada/lib.adb3
-rw-r--r--gcc/ada/make.adb8
-rw-r--r--gcc/ada/mlib.adb10
5 files changed, 31 insertions, 21 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 026acff..a7a3dbc 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-13 Arnaud Charlet <charlet@adacore.com>
+
+ * lib.adb, make.adb, mlib.adb, exp_dist.adb: Update comments.
+ Minor reformatting.
+
2009-07-13 Emmanuel Briot <briot@adacore.com>
* prj-env.adb (Create_Config_Pragmas_File): Iterate on sources rather
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index fa4327a..f13c8a4 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -874,7 +874,7 @@ package body Exp_Dist is
-- includes all limited types), append code to Stmts performing the
-- equivalent of:
-- Target := Typ'From_Any (N)
-
+ --
-- or, if Target is Empty:
-- return Typ'From_Any (N)
@@ -8439,21 +8439,21 @@ package body Exp_Dist is
Prefix => New_Occurrence_Of (Typ, Loc),
Attribute_Name => Name_Input,
Expressions => New_List (
- Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Strm, Loc),
- Attribute_Name => Name_Access)));
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (Strm, Loc),
+ Attribute_Name => Name_Access)));
- if Present (Target) then
- -- Target := Typ'Input (Strm'Access)
+ -- Target := Typ'Input (Strm'Access)
+ if Present (Target) then
Append_To (Stms,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Target, Loc),
Expression => Expr));
- else
- -- return Typ'Input (Strm'Access);
+ -- return Typ'Input (Strm'Access);
+ else
Append_To (Stms,
Make_Simple_Return_Statement (Loc,
Expression => Expr));
@@ -8469,6 +8469,7 @@ package body Exp_Dist is
Temp : constant Entity_Id :=
Make_Defining_Identifier
(Loc, New_Internal_Name ('R'));
+
begin
Read_Call_List := New_List;
Expr := New_Occurrence_Of (Temp, Loc);
@@ -8500,6 +8501,7 @@ package body Exp_Dist is
Expr)));
if No (Target) then
+
-- return Temp
Append_To (Read_Call_List,
@@ -8796,10 +8798,10 @@ package body Exp_Dist is
Build_From_Any_Call (Ctyp,
Build_Get_Aggregate_Element (Loc,
Any => Any,
- TC => Build_TypeCode_Call (Loc,
- Ctyp, Decls),
- Idx => Make_Integer_Literal (Loc,
- Counter)),
+ TC =>
+ Build_TypeCode_Call (Loc, Ctyp, Decls),
+ Idx =>
+ Make_Integer_Literal (Loc, Counter)),
Decls)));
else
diff --git a/gcc/ada/lib.adb b/gcc/ada/lib.adb
index a7c4128..802506b 100644
--- a/gcc/ada/lib.adb
+++ b/gcc/ada/lib.adb
@@ -606,6 +606,9 @@ package body Lib is
-- child subprogram body which we have not inserted into the table yet.
if N /= Library_Unit (Cunit (Main_Unit)) then
+ -- We do not use a pragma Assert here, since this would not be
+ -- enabled in case assertions are not active.
+
raise Program_Error;
else
return Main_Unit;
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 3d370be..877bff7 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -4446,8 +4446,8 @@ package body Make is
(ALI_Project.Object_Directory.Name);
end if;
- if not Is_Directory_Separator
- (Name_Buffer (Name_Len))
+ if not
+ Is_Directory_Separator (Name_Buffer (Name_Len))
then
Add_Char_To_Name_Buffer (Directory_Separator);
end if;
@@ -5308,8 +5308,8 @@ package body Make is
if not Is_Absolute_Path (Exec_File_Name) then
Get_Name_String (Main_Project.Exec_Directory.Name);
- if
- not Is_Directory_Separator (Name_Buffer (Name_Len))
+ if not
+ Is_Directory_Separator (Name_Buffer (Name_Len))
then
Add_Char_To_Name_Buffer (Directory_Separator);
end if;
diff --git a/gcc/ada/mlib.adb b/gcc/ada/mlib.adb
index 61fa0d7..4c4d375 100644
--- a/gcc/ada/mlib.adb
+++ b/gcc/ada/mlib.adb
@@ -210,11 +210,11 @@ package body MLib is
-- since the whole file is read at once except on VMS.
Curr := S'First;
-
while Curr <= Len loop
Actual_Len := Read (FD, S (Curr)'Address, Len);
-- Exit if we could not read for some reason
+
exit when Actual_Len = 0;
Curr := Curr + Actual_Len;
@@ -231,10 +231,10 @@ package body MLib is
-- at the beginning of the P line.
for Index in 1 .. Len - 3 loop
- if (S (Index) = ASCII.LF or else
- S (Index) = ASCII.CR)
- and then
- S (Index + 1) = 'P'
+ if (S (Index) = ASCII.LF
+ or else
+ S (Index) = ASCII.CR)
+ and then S (Index + 1) = 'P'
then
S (Index + 5 .. Len + 3) := S (Index + 2 .. Len);
S (Index + 2 .. Index + 4) := " SL";