Commit e5fc0179 by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformattings

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

gcc/ada/

	* exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
	reformattings.

From-SVN: r260508
parent eaf51442
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
reformattings.
2018-05-22 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
......
......@@ -238,8 +238,8 @@ package body Exp_Ch5 is
Statements => Stats,
End_Label => Empty);
-- If the contruct has a specified loop name, preserve it in the
-- new loop, for possible use in exit statements.
-- If the contruct has a specified loop name, preserve it in the new
-- loop, for possible use in exit statements.
if Present (Identifier (N))
and then Comes_From_Source (Identifier (N))
......
......@@ -8697,7 +8697,7 @@ package body Freeze is
and then not Is_Imported (Ent)
and then not Initialization_Suppressed (Typ)
and then not (Ekind (Ent) = E_Variable
and then Initialization_Suppressed (Ent))
and then Initialization_Suppressed (Ent))
and then (Has_Non_Null_Base_Init_Proc (Typ)
or else Is_Access_Type (Typ)
or else (Normalize_Scalars
......
......@@ -277,9 +277,14 @@ package body Pprint is
-- Transform given string into the corresponding one in
-- mixed case form.
-------------------
-- To_Mixed_Case --
-------------------
function To_Mixed_Case (S : String) return String is
Ucase : Boolean := True;
Result : String (S'Range);
Ucase : Boolean := True;
begin
for J in S'Range loop
if Ucase then
......@@ -294,14 +299,17 @@ package body Pprint is
return Result;
end To_Mixed_Case;
Id : constant Attribute_Id :=
Get_Attribute_Id (Attribute_Name (Expr));
Id : constant Attribute_Id :=
Get_Attribute_Id (Attribute_Name (Expr));
-- Always use mixed case for attributes
Str : constant String :=
Expr_Name (Prefix (Expr)) & "'"
& To_Mixed_Case (Get_Name_String
(Attribute_Name (Expr)));
Str : constant String :=
Expr_Name (Prefix (Expr))
& "'"
& To_Mixed_Case
(Get_Name_String (Attribute_Name (Expr)));
N : Node_Id;
Ranges : List_Id;
......
......@@ -3217,15 +3217,15 @@ package body Sem_Ch4 is
or else Nkind (Original_Node (N)) = N_Selected_Component
or else
(Nkind (Original_Node (N)) = N_Indexed_Component
and then Nkind (Prefix (Original_Node (N)))
= N_Selected_Component)
and then Nkind (Prefix (Original_Node (N))) =
N_Selected_Component)
or else
(Nkind (Parent (N)) = N_Function_Call
and then Is_Array_Type (Etype (Name (N)))
and then Etype (Original_Node (N)) =
Component_Type (Etype (Name (N)))
and then Nkind (Original_Node (Parent (N)))
= N_Selected_Component);
and then Is_Array_Type (Etype (Name (N)))
and then Etype (Original_Node (N)) =
Component_Type (Etype (Name (N)))
and then Nkind (Original_Node (Parent (N))) =
N_Selected_Component);
-- The first formal must be omitted from the match when trying to find
-- a primitive operation that is a possible interpretation, and also
......
......@@ -13011,18 +13011,15 @@ package body Sem_Res is
-- Here we have a real conversion error
else
-- Check for missing regular with_clause when only a limited view of
-- target is available.
-- Check for missing regular with_clause when only a limited view
-- of target is available.
if From_Limited_With (Opnd_Type)
and then In_Package_Body
then
if From_Limited_With (Opnd_Type) and then In_Package_Body then
Conversion_Error_NE
("invalid conversion, not compatible with limited view of }",
N, Opnd_Type);
Conversion_Error_NE ("\add with_clause for& to current unit!", N,
Scope (Opnd_Type));
N, Opnd_Type);
Conversion_Error_NE
("\add with_clause for& to current unit!", N, Scope (Opnd_Type));
elsif Is_Access_Type (Opnd_Type)
and then From_Limited_With (Designated_Type (Opnd_Type))
......@@ -13030,8 +13027,9 @@ package body Sem_Res is
then
Conversion_Error_NE
("invalid conversion, not compatible with }", N, Opnd_Type);
Conversion_Error_NE ("\add with_clause for& to current unit!", N,
Scope (Designated_Type (Opnd_Type)));
Conversion_Error_NE
("\add with_clause for& to current unit!",
N, Scope (Designated_Type (Opnd_Type)));
else
Conversion_Error_NE
......
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