Commit bd603506 by Robert Dewar Committed by Arnaud Charlet

sem_prag.adb, [...]: Minor reformatting.

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.

From-SVN: r178459
parent 24a120ac
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"
......
......@@ -4982,7 +4982,7 @@ package body Exp_Ch3 is
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));
......@@ -4992,14 +4992,13 @@ package body Exp_Ch3 is
-- 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;
......
......@@ -6769,7 +6769,6 @@ package body Prj.Nmsc is
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;
......
......@@ -4956,7 +4956,7 @@ package body Sem_Ch6 is
("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.
......@@ -4965,8 +4965,9 @@ package body Sem_Ch6 is
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);
......
......@@ -262,6 +262,11 @@ package body Sem_Prag is
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);
......
......@@ -12747,6 +12747,7 @@ package body Sem_Util is
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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment