* sem_aux.adb: Cleanup Is_Immutably_Limited_Type.
2010-10-08 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb: Minor reformatting.
* exp_ch5.adb: Add comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165177
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-10-08 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_aux.adb: Cleanup Is_Immutably_Limited_Type.
+
+2010-10-08 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch3.adb: Minor reformatting.
+ * exp_ch5.adb: Add comment.
+
2010-10-08 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Check_Duplicate_Pragma): Check for entity match
end if;
end;
- -- Otherwise create primitive equality operation (AI05-0123)
+ -- Otherwise create primitive equality operation (AI05-0123)
+
-- This is done unconditionally to ensure that tools can be linked
-- properly with user programs compiled with older language versions.
-- It might be worth including a switch to revert to a non-composable
Reason => PE_Accessibility_Check_Failed));
end;
- -- AI05-0073 : if function has a controlling access result, check that
+ -- AI05-0073: If function has a controlling access result, check that
-- the tag of the return value matches the designated type.
+ -- The "or else True" needs commenting here ???
+
elsif Ekind (R_Type) = E_Anonymous_Access_Type
and then Has_Controlling_Result (Scope_Id)
and then (Ada_Version >= Ada_12 or else True)
Btype : constant Entity_Id := Base_Type (Ent);
begin
- if Ekind (Btype) = E_Limited_Private_Type then
- if Nkind (Parent (Btype)) = N_Formal_Type_Declaration then
- return not In_Package_Body (Scope ((Btype)));
- else
- return True;
- end if;
+ if Ekind (Btype) = E_Limited_Private_Type
+ and then Nkind (Parent (Btype)) = N_Formal_Type_Declaration
+ then
+ return not In_Package_Body (Scope ((Btype)));
+ end if;
- elsif Is_Private_Type (Btype) then
+ if Is_Private_Type (Btype) then
-- AI05-0063 : a type derived from a limited private formal type
-- is not immutably limited in a generic body.