diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-07 09:46:48 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-07 09:46:48 +0000 |
commit | c53c8335303dd16ee22b726f0b47a38ee2398a52 (patch) | |
tree | 3f0ce912786f973e87338b2f1abe54b3ff6cb086 /gcc/ada/par-load.adb | |
parent | 0fb37f4c58ee47c4646f3a78d3cdaf479791d8f9 (diff) | |
download | gcc-c53c8335303dd16ee22b726f0b47a38ee2398a52.tar.gz |
2005-07-07 Ed Schonberg <schonberg@adacore.com>
Javier Miranda <miranda@adacore.com>
* par-load.adb (Load): If a child unit is loaded through a limited_with
clause, each parent must be loaded as a limited unit as well.
* sem_ch10.adb (Previous_Withed_Unit): Better name for
Check_Withed_Unit. Return true if there is a previous with_clause for
this unit, whether limited or not.
(Expand_Limited_With_Clause): Do not generate a limited_with_clause on
the current unit.
(Is_Visible_Through_Renamings): New local subprogram of install_limited
_withed_unit that checks if some package installed through normal with
clauses has a renaming declaration of package whose limited-view is
ready to be installed. This enforces the check of the rule 10.1.2 (21/2)
of the current Draft document for Ada 2005.
(Analyze_Context): Complete the list of compilation units that
are allowed to contain limited-with clauses. It also contains
checks that were previously done by Install_Limited_Context_Clauses.
This makes the code more clear and easy to maintain.
(Expand_Limited_With_Clause) It is now a local subprogram of
Install_Limited_Context_Clauses, and contains the code that adds
the implicit limited-with clauses for parents of child units.
This functionality was prevously done by Analyze_Context.
* sem_ch4.adb (Analyze_Selected_Component): Check wrong use of
incomplete type.
* sem_ch7.adb (Analyze_Package_Declaration): Check if the package has
been erroneously named in a limited-with clause of its own context.
In this case the error has been previously notified by Analyze_Context.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101697 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-load.adb')
-rw-r--r-- | gcc/ada/par-load.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/par-load.adb b/gcc/ada/par-load.adb index 3d42506a025..469a971c69d 100644 --- a/gcc/ada/par-load.adb +++ b/gcc/ada/par-load.adb @@ -301,6 +301,8 @@ begin end if; -- If current unit is a child unit spec, load its parent + -- If the child unit is loaded through a limited with, the parent + -- must be as well. elsif Nkind (Unit (Curunit)) = N_Package_Declaration or else Nkind (Unit (Curunit)) = N_Subprogram_Declaration @@ -323,7 +325,8 @@ begin (Load_Name => Spec_Name, Required => True, Subunit => False, - Error_Node => Curunit); + Error_Node => Curunit, + From_Limited_With => From_Limited_With); if Unum /= No_Unit then Set_Parent_Spec (Unit (Curunit), Cunit (Unum)); |