par-load.adb (Load): If a child unit is loaded through a limited_with clause...
authorEd Schonberg <schonberg@adacore.com>
Thu, 7 Jul 2005 09:46:48 +0000 (11:46 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 7 Jul 2005 09:46:48 +0000 (11:46 +0200)
commit28be29ce520375d392b5d7aa19f4dbd4e728f7e8
tree3f0ce912786f973e87338b2f1abe54b3ff6cb086
parent4e7ce6ab67dd7e0e4b3c20e2b7391d63a8a187e1
par-load.adb (Load): If a child unit is loaded through a limited_with clause...

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.

From-SVN: r101697
gcc/ada/par-load.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_ch7.adb