aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-10-27 14:22:25 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2009-10-27 14:22:25 +0100
commit0c0c6f49d575f70b8fbd64a5d033d65ee24f9ad2 (patch)
tree19a3adc4ab8d0fc718d9a6dc0de8064797138b72 /gcc/ada
parentfdfcc663025bcdca7562b2d16211a0588e484927 (diff)
downloadgcc-0c0c6f49d575f70b8fbd64a5d033d65ee24f9ad2.zip
gcc-0c0c6f49d575f70b8fbd64a5d033d65ee24f9ad2.tar.gz
gcc-0c0c6f49d575f70b8fbd64a5d033d65ee24f9ad2.tar.bz2
[multiple changes]
2009-10-27 Thomas Quinot <quinot@adacore.com> * sem_ch12.adb (Install_Formal_Packages): Do not omit installation of visible entities when the formal package doesn't have a box. * checks.adb: Minor reformatting. 2009-10-27 Vincent Celier <celier@adacore.com> * prj-part.adb (Parse): Catch exception Types.Unrecoverable_Error and set Project to Empty_Node. 2009-10-27 Robert Dewar <dewar@adacore.com> * gnatbind.adb: Minor reformatting From-SVN: r153593
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog16
-rw-r--r--gcc/ada/checks.adb2
-rw-r--r--gcc/ada/gnatbind.adb17
-rw-r--r--gcc/ada/prj-part.adb34
-rw-r--r--gcc/ada/sem_ch12.adb32
5 files changed, 59 insertions, 42 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d23b7c1..de24ed1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-27 Thomas Quinot <quinot@adacore.com>
+
+ * sem_ch12.adb (Install_Formal_Packages): Do not omit installation of
+ visible entities when the formal package doesn't have a box.
+
+ * checks.adb: Minor reformatting.
+
+2009-10-27 Vincent Celier <celier@adacore.com>
+
+ * prj-part.adb (Parse): Catch exception Types.Unrecoverable_Error and
+ set Project to Empty_Node.
+
+2009-10-27 Robert Dewar <dewar@adacore.com>
+
+ * gnatbind.adb: Minor reformatting
+
2009-10-27 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb: Fix comment.
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 5f7e990..ff51166 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -848,7 +848,7 @@ package body Checks is
-- is not set anyway, or we are not doing code expansion, or the
-- parent node is a type conversion whose operand is an arithmetic
-- operation on signed integers on which the expander can promote
- -- later the operands to type integer (see Expand_N_Type_Conversion).
+ -- later the operands to type Integer (see Expand_N_Type_Conversion).
-- Special case CLI target, where arithmetic overflow checks can be
-- performed for integer and long_integer
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb
index 2c5def4..fb3dc3d 100644
--- a/gcc/ada/gnatbind.adb
+++ b/gcc/ada/gnatbind.adb
@@ -838,12 +838,14 @@ begin
end if;
end loop;
- -- Subunits do not appear in the elaboration table because
- -- they are subsumed by their parent units, but we need to
- -- list them for other tools. For now they are listed after
- -- other files, rather than following immediately their parent,
- -- because there is no cheap link between the elaboration table
- -- and the ALIs table.
+ -- Subunits do not appear in the elaboration table because they
+ -- are subsumed by their parent units, but we need to list them
+ -- for other tools. For now they are listed after other files,
+ -- rather than right after their parent, since there is no easy
+ -- link between the elaboration table and the ALIs table ???
+ -- Note also that subunits may appear repeatedly in the list,
+ -- if the parent unit appears in the context of several units
+ -- in the closure.
for J in Sdep.First .. Sdep.Last loop
if Sdep.Table (J).Subunit_Name /= No_Name
@@ -853,8 +855,7 @@ begin
Write_Str (" ");
end if;
- Write_Str
- (Get_Name_String (Sdep.Table (J).Sfile));
+ Write_Str (Get_Name_String (Sdep.Table (J).Sfile));
Write_Eol;
end if;
end loop;
diff --git a/gcc/ada/prj-part.adb b/gcc/ada/prj-part.adb
index 1ed78ab..7702f54 100644
--- a/gcc/ada/prj-part.adb
+++ b/gcc/ada/prj-part.adb
@@ -485,19 +485,27 @@ package body Prj.Part is
return;
end if;
- Parse_Single_Project
- (In_Tree => In_Tree,
- Project => Project,
- Extends_All => Dummy,
- Path_Name => Path_Name,
- Extended => False,
- From_Extended => None,
- In_Limited => False,
- Packages_To_Check => Packages_To_Check,
- Depth => 0,
- Current_Dir => Current_Directory,
- Is_Config_File => Is_Config_File,
- Flags => Flags);
+ begin
+ Parse_Single_Project
+ (In_Tree => In_Tree,
+ Project => Project,
+ Extends_All => Dummy,
+ Path_Name => Path_Name,
+ Extended => False,
+ From_Extended => None,
+ In_Limited => False,
+ Packages_To_Check => Packages_To_Check,
+ Depth => 0,
+ Current_Dir => Current_Directory,
+ Is_Config_File => Is_Config_File,
+ Flags => Flags);
+
+ exception
+ when Types.Unrecoverable_Error =>
+ -- Unrecoverable_Error is raised when a line is too long.
+ -- A meaningful error message will be displayed later.
+ Project := Empty_Node;
+ end;
-- If Project is an extending-all project, create the eventual
-- virtual extending projects and check that there are no illegally
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 8e3c77e..174811b 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -540,12 +540,9 @@ package body Sem_Ch12 is
-- initialized before call to Check_Generic_Child_Unit.
procedure Install_Formal_Packages (Par : Entity_Id);
- -- If any of the formals of the parent are formal packages with box,
- -- their formal parts are visible in the parent and thus in the child
- -- unit as well. Analogous to what is done in Check_Generic_Actuals
- -- for the unit itself. This procedure is also used in an instance, to
- -- make visible the proper entities of the actual for a formal package
- -- declared with a box.
+ -- Install the visible part of any formal of the parent that is a formal
+ -- package. Note that for the case of a formal package with a box, this
+ -- includes the formal part of the formal package (12.7(10/2)).
procedure Install_Parent (P : Entity_Id; In_Body : Boolean := False);
-- When compiling an instance of a child unit the parent (which is
@@ -5217,11 +5214,10 @@ package body Sem_Ch12 is
elsif In_Open_Scopes (Inst_Par) then
- -- If the parent is already installed verify that the
- -- actuals for its formal packages declared with a box
- -- are already installed. This is necessary when the
- -- child instance is a child of the parent instance.
- -- In this case the parent is placed on the scope stack
+ -- If the parent is already installed, install the actuals
+ -- for its formal packages. This is necessary when the
+ -- child instance is a child of the parent instance:
+ -- in this case, the parent is placed on the scope stack
-- but the formal packages are not made visible.
Install_Formal_Packages (Inst_Par);
@@ -7191,24 +7187,20 @@ package body Sem_Ch12 is
if Renamed_Object (E) = Par then
exit;
- -- The visibility of a formal of an enclosing generic is
- -- already correct.
+ -- The visibility of a formal of an enclosing generic is already
+ -- correct.
elsif Denotes_Formal_Package (E) then
null;
- elsif Present (Associated_Formal_Package (E))
- and then Box_Present (Parent (Associated_Formal_Package (E)))
- then
+ elsif Present (Associated_Formal_Package (E)) then
Check_Generic_Actuals (Renamed_Object (E), True);
Set_Is_Hidden (E, False);
-- Find formal package in generic unit that corresponds to
-- (instance of) formal package in instance.
- while Present (Gen_E)
- and then Chars (Gen_E) /= Chars (E)
- loop
+ while Present (Gen_E) and then Chars (Gen_E) /= Chars (E) loop
Next_Entity (Gen_E);
end loop;
@@ -8365,7 +8357,7 @@ package body Sem_Ch12 is
"with volatile actual", Actual);
end if;
- -- formal in-parameter
+ -- Formal in-parameter
else
-- The instantiation of a generic formal in-parameter is constant