Commit 3d581777 by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
	Minor reformatting.

From-SVN: r260571
parent 72cfbeae
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
Minor reformatting.
2018-05-22 Justin Squirek <squirek@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
......
......@@ -253,13 +253,13 @@ package body Einfo is
-- Access_Disp_Table_Elab_Flag Node30
-- Anonymous_Object Node30
-- Corresponding_Equality Node30
-- Hidden_In_Formal_Instance Elist30
-- Last_Aggregate_Assignment Node30
-- Static_Initialization Node30
-- Hidden_In_Formal_Instance Elist30
-- Activation_Record_Component Node31
-- Derived_Type_Link Node31
-- Thunk_Entity Node31
-- Activation_Record_Component Node31
-- Corresponding_Function Node32
-- Corresponding_Procedure Node32
......
......@@ -5021,7 +5021,7 @@ package body Exp_Disp is
Constant_Present => True,
Object_Definition =>
New_Occurrence_Of (RTE (RE_Address), Loc),
Expression =>
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
......@@ -5033,7 +5033,8 @@ package body Exp_Disp is
end if;
end if;
-- Generate: Expanded_Name : constant String := "";
-- Generate:
-- Expanded_Name : constant String := "";
if Global_Discard_Names or else Discard_Names (Typ) then
Append_To (Result,
......@@ -5069,29 +5070,30 @@ package body Exp_Disp is
if Expanded_Name /= External_Tag_Name then
-- Generate: External_Tag_Name : constant String := "";
-- Generate:
-- External_Tag_Name : constant String := "";
if Present (No_Tagged_Streams_Pragma (Typ)) then
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => External_Tag_Name,
Constant_Present => True,
Object_Definition => New_Occurrence_Of
(Standard_String, Loc),
Expression =>
Make_String_Literal (Loc, "")));
Object_Definition =>
New_Occurrence_Of (Standard_String, Loc),
Expression => Make_String_Literal (Loc, "")));
-- Generate:
-- External_Tag_Name : constant String := full_qualified_name (typ);
-- External_Tag_Name : constant String :=
-- full_qualified_name (typ);
else
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => External_Tag_Name,
Constant_Present => True,
Object_Definition => New_Occurrence_Of
(Standard_String, Loc),
Expression =>
Object_Definition =>
New_Occurrence_Of (Standard_String, Loc),
Expression =>
Make_String_Literal (Loc,
Fully_Qualified_Name_String (First_Subtype (Typ)))));
end if;
......@@ -5198,8 +5200,7 @@ package body Exp_Disp is
New_Node :=
Unchecked_Convert_To (RTE (RE_Cstring_Ptr),
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of
(External_Tag_Name, Loc),
Prefix => New_Occurrence_Of (External_Tag_Name, Loc),
Attribute_Name => Name_Address));
-- External_Tag of a local tagged type
......@@ -5332,8 +5333,8 @@ package body Exp_Disp is
New_Node :=
Unchecked_Convert_To (RTE (RE_Cstring_Ptr),
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of
(External_Tag_Name, Loc),
Prefix =>
New_Occurrence_Of (External_Tag_Name, Loc),
Attribute_Name => Name_Address));
else
Old_Val := Strval (Expr_Value_S (Expression (Def)));
......
......@@ -17981,16 +17981,16 @@ package body Sem_Ch3 is
then
Result :=
Search_Derivation_Levels (Ti, Stored_Constraint (Ti), True);
else
declare
Td : Entity_Id := Etype (Ti);
begin
-- If the parent type is private, the full view may include
-- renamed discriminants, and it is those stored values
-- that may be needed (the partial view never has more
-- information than the full view).
-- renamed discriminants, and it is those stored values that
-- may be needed (the partial view never has more information
-- than the full view).
if Is_Private_Type (Td) and then Present (Full_View (Td)) then
Td := Full_View (Td);
......
......@@ -5396,12 +5396,12 @@ package body Sem_Ch6 is
elsif Is_Formal_Subprogram (Old_Id)
or else Is_Formal_Subprogram (New_Id)
or else (Is_Subprogram (New_Id)
and then Present (Alias (New_Id))
and then Is_Formal_Subprogram (Alias (New_Id)))
and then Present (Alias (New_Id))
and then Is_Formal_Subprogram (Alias (New_Id)))
then
Conformance_Error
("\formal subprograms are not subtype conformant "
& "(RM 6.3.1 (17/3))");
("\formal subprograms are not subtype conformant "
& "(RM 6.3.1 (17/3))");
end if;
end if;
......
......@@ -21267,9 +21267,7 @@ package body Sem_Prag is
end if;
if In_Same_Declarative_Part (Parent (N), Orig_Def) then
Same_Decl := True;
Set_Is_Pure (Def_Id);
if not Has_Pragma_Pure_Function (Def_Id) then
......@@ -21289,10 +21287,11 @@ package body Sem_Prag is
Error_Msg_NE
("pragma Pure_Function on& is redundant?r?",
N, Entity (E_Id));
elsif not Same_Decl then
Error_Pragma_Arg
("pragma% argument must be in same declarative "
& "part", Arg1);
("pragma% argument must be in same declarative part",
Arg1);
end if;
end if;
end Pure_Function;
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