Commit 27d357ca by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
	Minor reformatting.

From-SVN: r256518
parent cb488118
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
Minor reformatting.
2018-01-11 Justin Squirek <squirek@adacore.com> 2018-01-11 Justin Squirek <squirek@adacore.com>
* par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1979,6 +1979,7 @@ package body Binde is ...@@ -1979,6 +1979,7 @@ package body Binde is
declare declare
Uname : constant Unit_Name_Type := Name_Find (Get_Line); Uname : constant Unit_Name_Type := Name_Find (Get_Line);
Error : Boolean := False; Error : Boolean := False;
begin begin
if Uname = Empty_Name then if Uname = Empty_Name then
null; -- silently skip blank lines null; -- silently skip blank lines
...@@ -2012,8 +2013,9 @@ package body Binde is ...@@ -2012,8 +2013,9 @@ package body Binde is
Error_Msg_Nat_1 := Nat (Cur_Line_Number); Error_Msg_Nat_1 := Nat (Cur_Line_Number);
Error_Msg_Unit_1 := Uname; Error_Msg_Unit_1 := Uname;
Error_Msg_Nat_2 := Nat (Dup); Error_Msg_Nat_2 := Nat (Dup);
Error_Msg (Force_Elab_Order_File.all & Error_Msg
":#: duplicate unit name $ from line #"); (Force_Elab_Order_File.all
& ":#: duplicate unit name $ from line #");
end if; end if;
end if; end if;
end; end;
...@@ -2027,8 +2029,8 @@ package body Binde is ...@@ -2027,8 +2029,8 @@ package body Binde is
then then
if Doing_New then if Doing_New then
Write_Line Write_Line
("""" & Get_Name_String (Uname) & ("""" & Get_Name_String (Uname)
""": predefined unit ignored"); & """: predefined unit ignored");
end if; end if;
else else
......
...@@ -873,6 +873,7 @@ package body Ch6 is ...@@ -873,6 +873,7 @@ package body Ch6 is
New_Node New_Node
(N_Expression_Function, Sloc (Specification_Node)); (N_Expression_Function, Sloc (Specification_Node));
Set_Specification (Body_Node, Specification_Node); Set_Specification (Body_Node, Specification_Node);
declare declare
Expr : constant Node_Id := P_Expression; Expr : constant Node_Id := P_Expression;
begin begin
...@@ -888,8 +889,9 @@ package body Ch6 is ...@@ -888,8 +889,9 @@ package body Ch6 is
N_Extension_Aggregate, N_Extension_Aggregate,
N_Quantified_Expression)) N_Quantified_Expression))
then then
Error_Msg ("expression function must be enclosed " Error_Msg
& "in parentheses", Sloc (Expr)); ("expression function must be enclosed in "
& "parentheses", Sloc (Expr));
end if; end if;
end; end;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -787,8 +787,7 @@ package body Ch9 is ...@@ -787,8 +787,7 @@ package body Ch9 is
-- Start of processing for P_Protected_Operation_Declaration_Opt -- Start of processing for P_Protected_Operation_Declaration_Opt
begin begin
-- This loop runs more than once only when a junk declaration -- This loop runs more than once only when a junk declaration is skipped
-- is skipped.
loop loop
case Token is case Token is
...@@ -796,7 +795,9 @@ package body Ch9 is ...@@ -796,7 +795,9 @@ package body Ch9 is
Result := P_Pragma; Result := P_Pragma;
exit; exit;
when Tok_Not | Tok_Overriding => when Tok_Not
| Tok_Overriding
=>
Result := P_Entry_Or_Subprogram_With_Indicator; Result := P_Entry_Or_Subprogram_With_Indicator;
exit; exit;
...@@ -804,7 +805,9 @@ package body Ch9 is ...@@ -804,7 +805,9 @@ package body Ch9 is
Result := P_Entry_Declaration; Result := P_Entry_Declaration;
exit; exit;
when Tok_Function | Tok_Procedure => when Tok_Function
| Tok_Procedure
=>
Result := P_Subprogram (Pf_Decl_Pexp); Result := P_Subprogram (Pf_Decl_Pexp);
exit; exit;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1279,9 +1279,8 @@ package body Sem_Ch12 is ...@@ -1279,9 +1279,8 @@ package body Sem_Ch12 is
if No (Formal) then if No (Formal) then
Error_Msg_Sloc := Sloc (Node (Elem)); Error_Msg_Sloc := Sloc (Node (Elem));
Error_Msg_NE Error_Msg_NE
("?instance uses predefined operation, " ("?instance uses predefined operation, not primitive "
& "not primitive operation&#", & "operation&#", Actual, Node (Elem));
Actual, Node (Elem));
end if; end if;
end if; end if;
......
...@@ -12690,8 +12690,8 @@ package body Sem_Ch13 is ...@@ -12690,8 +12690,8 @@ package body Sem_Ch13 is
elsif Nkind (N) = N_Selected_Component then elsif Nkind (N) = N_Selected_Component then
-- If selector name is not our type, keep going (we might still -- If selector name is not our type, keep going (we might still
-- have an occurrence of the type in the prefix). -- have an occurrence of the type in the prefix). If it is a
-- If it is a subcomponent of the current entity, add prefix. -- subcomponent of the current entity, add prefix.
if Nkind (Selector_Name (N)) /= N_Identifier if Nkind (Selector_Name (N)) /= N_Identifier
or else Chars (Selector_Name (N)) /= TName or else Chars (Selector_Name (N)) /= TName
......
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