diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-12 10:11:25 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-12 10:11:25 +0200 |
commit | 473469230a0224c19584317db7c2b9e9bb07c5c1 (patch) | |
tree | 437c2d0856bbb6a4ed19c76af7be237db1cd11ab /gcc/ada/sem_ch8.adb | |
parent | 0cc1540d55a2e7ff710588b78c0b6efc8dc6a51f (diff) | |
download | gcc-473469230a0224c19584317db7c2b9e9bb07c5c1.zip gcc-473469230a0224c19584317db7c2b9e9bb07c5c1.tar.gz gcc-473469230a0224c19584317db7c2b9e9bb07c5c1.tar.bz2 |
[multiple changes]
2015-05-12 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
Null statements.
* namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
* par-prag.adb (Prag): Implement Ignore_Pragma.
* sem_prag.adb: Implement Ignore_Pragma.
* snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2015-05-12 Javier Miranda <miranda@adacore.com>
* sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
entity with its corresponding real entity.
(Decorate_Type): Unconditionally build the class-wide shadow entity of
tagged types.
* einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
attribute.
(Non_Limited_View): Moved from field 17 to field 19 be available
in class-wide entities.
* exp_attr.adb (Access_Cases): Code cleanup.
* exp_disp.adb (Expand_Interface_Actuals): Ditto.
* exp_util.adb (Non_Limited_Designated_Type): Ditto.
* freeze.adb (Build_Renamed_Bdody): Ditto.
* sem_aux.adb (Available_View): Ditto.
* sem_ch4.adb (Analyze_Selected_Component): Ditto.
(Try_One_Prefix_Interpretation): Ditto.
* sem_ch5.adb (Analyze_Assignment): Ditto.
* sem_ch6.adb (Detect_And_Exchange): Ditto.
* sem_ch8.adb (Find_Expanded_Name): Ditto.
* sem_disp.adb (Check_Controlling_Type): Ditto.
* sem_res.adb (Resolve_Type_Conversion): Ditto.
(Full_Designated_Type): Ditto.
* sem_type.adb (Covers): Ditto.
* sem_util.adb: Fix typo in comment.
From-SVN: r223038
Diffstat (limited to 'gcc/ada/sem_ch8.adb')
-rw-r--r-- | gcc/ada/sem_ch8.adb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 921b781..2a74e6f 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -5767,18 +5767,20 @@ package body Sem_Ch8 is end if; end if; - -- Ada 2005 (AI-217): Handle shadow entities associated with types - -- declared in limited-withed nested packages. We don't need to - -- handle E_Incomplete_Subtype entities because the entities in - -- the limited view are always E_Incomplete_Type entities (see - -- Build_Limited_Views). Regarding the expression used to evaluate - -- the scope, it is important to note that the limited view also - -- has shadow entities associated nested packages. For this reason - -- the correct scope of the entity is the scope of the real entity + -- Ada 2005 (AI-217): Handle shadow entities associated with + -- types declared in limited-withed nested packages. We don't need + -- to handle E_Incomplete_Subtype entities because the entities + -- in the limited view are always E_Incomplete_Type and + -- E_Class_Wide_Type entities (see Build_Limited_Views). + + -- Regarding the expression used to evaluate the scope, it + -- is important to note that the limited view also has shadow + -- entities associated nested packages. For this reason the + -- correct scope of the entity is the scope of the real entity. -- The non-limited view may itself be incomplete, in which case -- get the full view if available. - elsif Ekind (Id) = E_Incomplete_Type + elsif Ekind_In (Id, E_Incomplete_Type, E_Class_Wide_Type) and then From_Limited_With (Id) and then Present (Non_Limited_View (Id)) and then Scope (Non_Limited_View (Id)) = P_Name @@ -6725,17 +6727,15 @@ package body Sem_Ch8 is -- The designated type may be a limited view with no components. -- Check whether the non-limited view is available, because in some - -- cases this will not be set when instlling the context. + -- cases this will not be set when installing the context. if Is_Access_Type (P_Type) then declare D : constant Entity_Id := Directly_Designated_Type (P_Type); begin if Is_Incomplete_Type (D) - and then not Is_Class_Wide_Type (D) and then From_Limited_With (D) and then Present (Non_Limited_View (D)) - and then not Is_Class_Wide_Type (Non_Limited_View (D)) then Set_Directly_Designated_Type (P_Type, Non_Limited_View (D)); end if; |