]> git.ipfire.org Git - thirdparty/gcc.git/commit
sem_attr.adb: Add with and use clauses for Sem_Ch10.
authorHristian Kirtchev <kirtchev@adacore.com>
Tue, 23 Jun 2009 10:15:47 +0000 (10:15 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 23 Jun 2009 10:15:47 +0000 (12:15 +0200)
commitc0985d4ed8bc79ad6cafed12f7fa3089d13879ae
treec2323c664483500ace95513d11d3ccfe251a282a
parent0d354370f2e1b51efcf45c9241cabd0c7873b977
sem_attr.adb: Add with and use clauses for Sem_Ch10.

2009-06-23  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_attr.adb: Add with and use clauses for Sem_Ch10.
(Check_Not_Incomplete_Type): Minor reformatting. Retrieve the root type
when dealing with class-wide types. Detect a legal shadow entity and
retrieve its non-limited view.

* sem_ch10.adb (Has_With_Clause): Move the spec and body of the
subprogram to top package level from Intall_Limited_Withed_Unit.
(Install_Limited_Withed_Unit): Remove spec and body of Has_With_Clause.
Add check which prevents the installation of a limited view if the
non-limited view is already visible through a with clause.
(Is_Legal_Shadow_Entity_In_Body): New routine. Detect a residual, but
legal shadow entity which may occur in subprogram formals of anonymous
access type.

* sem_ch10.ads (Is_Legal_Shadow_Entity_In_Body): New routine.

* sem_ch3.adb (Access_Definition): Remove the propagation of flag
From_With_Type from the designated type to the generated anonymous
access type. Remove associated comment.

* sem_res.adb Add with and use clauses for Sem_Ch10.
(Full_Designated_Type): Detect a legal shadow entity and retrieve its
non-limited view. Since the shadow entity may replace a regular
incomplete type, return the available full view.

From-SVN: r148844
gcc/ada/ChangeLog
gcc/ada/sem_attr.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch10.ads
gcc/ada/sem_ch3.adb
gcc/ada/sem_res.adb