* sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
exp_ch3.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178459
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-09-02 Robert Dewar <dewar@adacore.com>
+
+ * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
+ exp_ch3.adb: Minor reformatting.
+
2011-09-02 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => Obj_Id,
- Object_Definition =>
+ Object_Definition =>
New_Occurrence_Of
(Etype (Object_Definition (N)), Loc),
Expression => New_Expr));
-- has been previously expanded into a temporary object.
else pragma Assert (not Comes_From_Source (Expr_Q));
-
Insert_Action (N,
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => Obj_Id,
- Subtype_Mark =>
+ Subtype_Mark =>
New_Occurrence_Of
(Etype (Object_Definition (N)), Loc),
- Name =>
+ Name =>
Unchecked_Convert_To
(Etype (Object_Definition (N)), New_Expr)));
end if;
if Source.Unit /= null then
if Source.Kind = Spec then
Source.Unit.File_Names (Spec) := Source;
-
else
Source.Unit.File_Names (Impl) := Source;
end if;
("subprogram & overrides inherited operation #", Spec, Subp);
end if;
- -- Special-case to fix a GNAT oddity: Limited_Controlled is declared
+ -- Special-case to fix a GNAT oddity: Limited_Controlled is declared
-- as an extension of Root_Controlled, and thus has a useless Adjust
-- operation. This operation should not be inherited by other limited
-- controlled types. An explicit Adjust for them is not overriding.
and then Chars (Overridden_Subp) = Name_Adjust
and then Is_Limited_Type (Etype (First_Formal (Subp)))
and then Present (Alias (Overridden_Subp))
- and then Is_Predefined_File_Name
- (Unit_File_Name (Get_Source_Unit (Alias (Overridden_Subp))))
+ and then
+ Is_Predefined_File_Name
+ (Unit_File_Name (Get_Source_Unit (Alias (Overridden_Subp))))
then
Error_Msg_NE ("subprogram & is not overriding", Spec, Subp);
Preanalyze_Spec_Expression
(Get_Pragma_Arg (Arg1), Standard_Boolean);
+ -- For a class-wide condition, a reference to a controlling formal must
+ -- be interpreted as having the class-wide type (or an access to such)
+ -- so that the inherited condition can be properly applied to any
+ -- overriding operation (see ARM12 6.6.1 (7)).
+
if Class_Present (N) then
declare
T : constant Entity_Id := Find_Dispatching_Type (S);
then
return Get_Name_String (Name_Standard) & "__" &
Get_Name_String (Chars (E));
+
elsif Ekind (E) = E_Enumeration_Literal then
return Unique_Name (Etype (E)) & "__" & Get_Name_String (Chars (E));