Commit 8c35b40a by Arnaud Charlet

[multiple changes]

2014-02-06  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
	reformatting.

2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Process_Formals): Error message reformatting.

From-SVN: r207555
parent 0a756a3f
2014-02-06 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
reformatting.
2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Process_Formals): Error message reformatting.
2014-02-06 Hristian Kirtchev <kirtchev@adacore.com> 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
......
...@@ -1069,7 +1069,7 @@ package body Lib.Xref is ...@@ -1069,7 +1069,7 @@ package body Lib.Xref is
end if; end if;
Add_Entry Add_Entry
((Ent => Ent, ((Ent => Ent,
Loc => Ref, Loc => Ref,
Typ => Actual_Typ, Typ => Actual_Typ,
Eun => Get_Source_Unit (Def), Eun => Get_Source_Unit (Def),
...@@ -1612,11 +1612,11 @@ package body Lib.Xref is ...@@ -1612,11 +1612,11 @@ package body Lib.Xref is
and then Sloc (E) > No_Location and then Sloc (E) > No_Location
then then
Add_Entry Add_Entry
((Ent => E, ((Ent => E,
Loc => No_Location, Loc => No_Location,
Typ => Character'First, Typ => Character'First,
Eun => Get_Source_Unit (Original_Location (Sloc (E))), Eun => Get_Source_Unit (Original_Location (Sloc (E))),
Lun => No_Unit, Lun => No_Unit,
Ref_Scope => Empty, Ref_Scope => Empty,
Ent_Scope => Empty), Ent_Scope => Empty),
Ent_Scope_File => No_Unit); Ent_Scope_File => No_Unit);
...@@ -1700,11 +1700,11 @@ package body Lib.Xref is ...@@ -1700,11 +1700,11 @@ package body Lib.Xref is
if Present (Prim) then if Present (Prim) then
Add_Entry Add_Entry
((Ent => Prim, ((Ent => Prim,
Loc => No_Location, Loc => No_Location,
Typ => Character'First, Typ => Character'First,
Eun => Get_Source_Unit (Sloc (Prim)), Eun => Get_Source_Unit (Sloc (Prim)),
Lun => No_Unit, Lun => No_Unit,
Ref_Scope => Empty, Ref_Scope => Empty,
Ent_Scope => Empty), Ent_Scope => Empty),
Ent_Scope_File => No_Unit); Ent_Scope_File => No_Unit);
......
...@@ -2160,8 +2160,7 @@ package body Sem_Ch3 is ...@@ -2160,8 +2160,7 @@ package body Sem_Ch3 is
Spec := Copy_Separate_Tree (Body_Spec); Spec := Copy_Separate_Tree (Body_Spec);
-- Ensure that the subprogram declaration does not inherit the null -- Ensure that the subprogram declaration does not inherit the null
-- indicator from the body as we now have a proper spec and body -- indicator from the body as we now have a proper spec/body pair.
-- pair.
Set_Null_Present (Spec, False); Set_Null_Present (Spec, False);
......
...@@ -1255,7 +1255,7 @@ package body Sem_Ch6 is ...@@ -1255,7 +1255,7 @@ package body Sem_Ch6 is
Null_Body := Null_Body :=
Make_Subprogram_Body (Loc, Make_Subprogram_Body (Loc,
Specification => New_Copy_Tree (Spec), Specification => New_Copy_Tree (Spec),
Declarations => New_List, Declarations => New_List,
Handled_Statement_Sequence => Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc, Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (Make_Null_Statement (Loc)))); Statements => New_List (Make_Null_Statement (Loc))));
...@@ -11243,8 +11243,8 @@ package body Sem_Ch6 is ...@@ -11243,8 +11243,8 @@ package body Sem_Ch6 is
elsif Is_SPARK_Volatile_Object (Formal) then elsif Is_SPARK_Volatile_Object (Formal) then
Error_Msg_N Error_Msg_N
("function cannot have a volatile formal parameter (SPARK RM " ("function cannot have a volatile formal parameter "
& "7.1.3(10))", Formal); & "(SPARK RM 7.1.3(10))", Formal);
end if; end if;
end if; end if;
......
...@@ -850,8 +850,8 @@ package body Sem_Prag is ...@@ -850,8 +850,8 @@ package body Sem_Prag is
("cannot mention state & in global refinement", ("cannot mention state & in global refinement",
Item, Item_Id); Item, Item_Id);
Error_Msg_N Error_Msg_N
("\use its constituents instead (SPARK RM " ("\use its constituents instead "
& "6.1.5(3))", Item); & "(SPARK RM 6.1.5(3))", Item);
return; return;
-- If the reference to the abstract state appears in -- If the reference to the abstract state appears in
...@@ -958,8 +958,8 @@ package body Sem_Prag is ...@@ -958,8 +958,8 @@ package body Sem_Prag is
begin begin
if Ekind (Spec_Id) = E_Function and then not Result_Seen then if Ekind (Spec_Id) = E_Function and then not Result_Seen then
Error_Msg_NE Error_Msg_NE
("result of & must appear in exactly one output list (SPARK RM " ("result of & must appear in exactly one output list "
& "6.1.5(10))", N, Spec_Id); & "(SPARK RM 6.1.5(10))", N, Spec_Id);
end if; end if;
end Check_Function_Return; end Check_Function_Return;
...@@ -1413,8 +1413,8 @@ package body Sem_Prag is ...@@ -1413,8 +1413,8 @@ package body Sem_Prag is
elsif Is_Attribute_Result (Output) then elsif Is_Attribute_Result (Output) then
Error_Msg_N Error_Msg_N
("function result cannot depend on itself (SPARK RM " ("function result cannot depend on itself "
& "6.1.5(10))", Output); & "(SPARK RM 6.1.5(10))", Output);
return; return;
end if; end if;
...@@ -1810,8 +1810,8 @@ package body Sem_Prag is ...@@ -1810,8 +1810,8 @@ package body Sem_Prag is
end if; end if;
else else
Error_Msg_N Error_Msg_N
("external property % must apply to a volatile object (SPARK RM " ("external property % must apply to a volatile object "
& "7.1.3(2))", N); & "(SPARK RM 7.1.3(2))", N);
end if; end if;
-- Ensure that the expression (if present) is static Boolean. A missing -- Ensure that the expression (if present) is static Boolean. A missing
...@@ -1954,16 +1954,16 @@ package body Sem_Prag is ...@@ -1954,16 +1954,16 @@ package body Sem_Prag is
elsif Ekind (Item_Id) = E_Constant then elsif Ekind (Item_Id) = E_Constant then
Error_Msg_N Error_Msg_N
("global item cannot denote a constant (SPARK RM " ("global item cannot denote a constant "
& "6.1.4(7))", Item); & "(SPARK RM 6.1.4(7))", Item);
-- The only legal references are those to abstract states and -- The only legal references are those to abstract states and
-- variables. -- variables.
elsif not Ekind_In (Item_Id, E_Abstract_State, E_Variable) then elsif not Ekind_In (Item_Id, E_Abstract_State, E_Variable) then
Error_Msg_N Error_Msg_N
("global item must denote variable or state (SPARK RM " ("global item must denote variable or state "
& "6.1.4(4))", Item); & "(SPARK RM 6.1.4(4))", Item);
return; return;
end if; end if;
...@@ -2004,8 +2004,8 @@ package body Sem_Prag is ...@@ -2004,8 +2004,8 @@ package body Sem_Prag is
then then
Error_Msg_NE Error_Msg_NE
("volatile global item & with property Effective_Reads " ("volatile global item & with property Effective_Reads "
& "must have mode In_Out or Output (SPARK RM " & "must have mode In_Out or Output "
& "7.1.3(11))", Item, Item_Id); & "(SPARK RM 7.1.3(11))", Item, Item_Id);
return; return;
end if; end if;
end if; end if;
...@@ -2022,8 +2022,8 @@ package body Sem_Prag is ...@@ -2022,8 +2022,8 @@ package body Sem_Prag is
else else
Error_Msg_N Error_Msg_N
("global item must denote variable or state (SPARK RM " ("global item must denote variable or state "
& "6.1.4(4))", Item); & "(SPARK RM 6.1.4(4))", Item);
return; return;
end if; end if;
...@@ -2150,8 +2150,8 @@ package body Sem_Prag is ...@@ -2150,8 +2150,8 @@ package body Sem_Prag is
begin begin
if Ekind (Spec_Id) = E_Function then if Ekind (Spec_Id) = E_Function then
Error_Msg_N Error_Msg_N
("global mode & is not applicable to functions (SPARK RM " ("global mode & is not applicable to functions "
& "6.1.4(10))", Mode); & "(SPARK RM 6.1.4(10))", Mode);
end if; end if;
end Check_Mode_Restriction_In_Function; end Check_Mode_Restriction_In_Function;
...@@ -3538,8 +3538,8 @@ package body Sem_Prag is ...@@ -3538,8 +3538,8 @@ package body Sem_Prag is
if Placement = Not_In_Package then if Placement = Not_In_Package then
Error_Msg_N Error_Msg_N
("indicator Part_Of may not appear in this context (SPARK RM " ("indicator Part_Of may not appear in this context "
& "7.2.6(5))", Indic); & "(SPARK RM 7.2.6(5))", Indic);
Error_Msg_Name_1 := Chars (Scope (State_Id)); Error_Msg_Name_1 := Chars (Scope (State_Id));
Error_Msg_NE Error_Msg_NE
("\& is not part of the hidden state of package %", ("\& is not part of the hidden state of package %",
...@@ -3593,8 +3593,8 @@ package body Sem_Prag is ...@@ -3593,8 +3593,8 @@ package body Sem_Prag is
else else
Error_Msg_N Error_Msg_N
("indicator Part_Of may not appear in this context (SPARK RM " ("indicator Part_Of may not appear in this context "
& "7.2.6(5))", Indic); & "(SPARK RM 7.2.6(5))", Indic);
if Scope (State_Id) = Pack_Id then if Scope (State_Id) = Pack_Id then
Error_Msg_Name_1 := Chars (Pack_Id); Error_Msg_Name_1 := Chars (Pack_Id);
...@@ -22384,8 +22384,8 @@ package body Sem_Prag is ...@@ -22384,8 +22384,8 @@ package body Sem_Prag is
Posted := True; Posted := True;
Error_Msg_NE Error_Msg_NE
("output state & must be replaced by all its " ("output state & must be replaced by all its "
& "constituents in global refinement (SPARK RM " & "constituents in global refinement "
& "7.2.5(3))", N, State_Id); & "(SPARK RM 7.2.5(3))", N, State_Id);
end if; end if;
Error_Msg_NE Error_Msg_NE
...@@ -24002,8 +24002,8 @@ package body Sem_Prag is ...@@ -24002,8 +24002,8 @@ package body Sem_Prag is
else else
Error_Msg_N Error_Msg_N
("indicator Part_Of is required in this context (SPARK RM " ("indicator Part_Of is required in this context "
& "7.2.6(3))", Item_Id); & "(SPARK RM 7.2.6(3))", Item_Id);
Error_Msg_Name_1 := Chars (Pack_Id); Error_Msg_Name_1 := Chars (Pack_Id);
Error_Msg_N Error_Msg_N
("\& is declared in the visible part of private child unit %", ("\& is declared in the visible part of private child unit %",
...@@ -24035,8 +24035,8 @@ package body Sem_Prag is ...@@ -24035,8 +24035,8 @@ package body Sem_Prag is
else else
Error_Msg_N Error_Msg_N
("indicator Part_Of is required in this context (SPARK RM " ("indicator Part_Of is required in this context "
& "7.2.6(2))", Item_Id); & "(SPARK RM 7.2.6(2))", Item_Id);
Error_Msg_Name_1 := Chars (Pack_Id); Error_Msg_Name_1 := Chars (Pack_Id);
Error_Msg_N Error_Msg_N
("\& is declared in the private part of package %", Item_Id); ("\& is declared in the private part of package %", Item_Id);
......
...@@ -4343,8 +4343,8 @@ package body Sem_Res is ...@@ -4343,8 +4343,8 @@ package body Sem_Res is
Error_Msg_Name_1 := Name_Async_Writers; Error_Msg_Name_1 := Name_Async_Writers;
Error_Msg_NE Error_Msg_NE
("external variable & with enabled property % cannot " ("external variable & with enabled property % cannot "
& "appear as actual in procedure call (SPARK RM " & "appear as actual in procedure call "
& "7.1.3(11))", A, A_Id); & "(SPARK RM 7.1.3(11))", A, A_Id);
Error_Msg_N Error_Msg_N
("\\corresponding formal parameter has mode Out", A); ("\\corresponding formal parameter has mode Out", A);
end if; end if;
...@@ -6637,8 +6637,8 @@ package body Sem_Res is ...@@ -6637,8 +6637,8 @@ package body Sem_Res is
if not Usage_OK then if not Usage_OK then
Error_Msg_N Error_Msg_N
("volatile object cannot appear in this context (SPARK RM " ("volatile object cannot appear in this context "
& "7.1.3(13))", N); & "(SPARK RM 7.1.3(13))", N);
end if; end if;
end if; end if;
end Resolve_Entity_Name; end Resolve_Entity_Name;
......
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