[Ada] Assorted style cleanups

gcc/ada/

	* checks.adb, exp_aggr.adb, exp_attr.adb, exp_ch6.adb,
	freeze.adb, sem_aggr.adb, sem_attr.adb, sem_ch13.adb,
	sem_ch13.ads, sem_ch6.adb, sem_eval.adb, sem_util.adb: Fix style
	and typos.
This commit is contained in:
Piotr Trojanek 2020-07-02 14:01:18 +02:00 committed by Pierre-Marie de Rodat
parent 4b97cbeed9
commit 23a9215f3e
12 changed files with 27 additions and 30 deletions

View File

@ -3590,7 +3590,7 @@ package body Checks is
elsif Is_Scalar_Type (Target_Type) then
declare
Conv_OK : constant Boolean := Conversion_OK (N);
Conv_OK : constant Boolean := Conversion_OK (N);
-- If the Conversion_OK flag on the type conversion is set and no
-- floating-point type is involved in the type conversion then
-- fixed-point values must be read as integral values.

View File

@ -6376,7 +6376,7 @@ package body Exp_Aggr is
Convert_To_Positional (N);
-- if the result is no longer an aggregate (e.g. it may be a string
-- If the result is no longer an aggregate (e.g. it may be a string
-- literal, or a temporary which has the needed value), then we are
-- done, since there is no longer a nested aggregate.
@ -8165,7 +8165,7 @@ package body Exp_Aggr is
Convert_To_Assignments (N, Typ);
-- In all other cases, build a proper aggregate to be handled by
-- the back-end
-- the back-end.
else
Build_Back_End_Aggregate;

View File

@ -1806,9 +1806,9 @@ package body Exp_Attr is
----------------------------------
procedure Expand_N_Attribute_Reference (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Pref : constant Node_Id := Prefix (N);
Exprs : constant List_Id := Expressions (N);
Loc : constant Source_Ptr := Sloc (N);
Pref : constant Node_Id := Prefix (N);
Exprs : constant List_Id := Expressions (N);
function Get_Integer_Type (Typ : Entity_Id) return Entity_Id;
-- Return a small integer type appropriate for the enumeration type
@ -1950,10 +1950,10 @@ package body Exp_Attr is
Analyze (N);
end Rewrite_Attribute_Proc_Call;
Typ : constant Entity_Id := Etype (N);
Btyp : constant Entity_Id := Base_Type (Typ);
Ptyp : constant Entity_Id := Etype (Pref);
Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
Typ : constant Entity_Id := Etype (N);
Btyp : constant Entity_Id := Base_Type (Typ);
Ptyp : constant Entity_Id := Etype (Pref);
Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
-- Start of processing for Expand_N_Attribute_Reference

View File

@ -2682,22 +2682,22 @@ package body Exp_Ch6 is
| N_Function_Call
| N_Procedure_Call_Statement);
-- Check that this is not the call in the body of the wrapper.
-- Check that this is not the call in the body of the wrapper
if Must_Rewrite_Indirect_Call
and then (not Is_Overloadable (Current_Scope)
or else not Is_Access_Subprogram_Wrapper (Current_Scope))
then
declare
Loc : constant Source_Ptr := Sloc (N);
Wrapper : constant Entity_Id :=
Loc : constant Source_Ptr := Sloc (N);
Wrapper : constant Entity_Id :=
Access_Subprogram_Wrapper (Etype (Name (N)));
Ptr : constant Node_Id := Prefix (Name (N));
Ptr_Type : constant Entity_Id := Etype (Ptr);
Typ : constant Entity_Id := Etype (N);
New_N : Node_Id;
Parms : List_Id := Parameter_Associations (N);
Parms : List_Id := Parameter_Associations (N);
Ptr_Act : Node_Id;
begin
@ -2735,7 +2735,7 @@ package body Exp_Ch6 is
if Nkind (N) = N_Procedure_Call_Statement then
New_N := Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Wrapper, Loc),
Name => New_Occurrence_Of (Wrapper, Loc),
Parameter_Associations => Parms);
else
New_N := Make_Function_Call (Loc,
@ -2927,7 +2927,7 @@ package body Exp_Ch6 is
if Has_Invariants (Curr_Typ)
and then Present (Invariant_Procedure (Curr_Typ))
then
-- Verify the invariate of the current type. Generate:
-- Verify the invariant of the current type. Generate:
-- <Curr_Typ>Invariant (Curr_Typ (Arg));
@ -3405,8 +3405,7 @@ package body Exp_Ch6 is
end;
end if;
-- if this is a call to a predicate function, try to constant
-- fold it.
-- If this is a call to a predicate function, try to constant fold it
if Nkind (Call_Node) = N_Function_Call
and then Is_Entity_Name (Name (Call_Node))
@ -4516,7 +4515,7 @@ package body Exp_Ch6 is
end if;
-- Ada 2005 (AI-251): If some formal is a class-wide interface, expand
-- it to point to the correct secondary virtual table
-- it to point to the correct secondary virtual table.
if Nkind (Call_Node) in N_Subprogram_Call
and then CW_Interface_Formals_Present
@ -4932,7 +4931,7 @@ package body Exp_Ch6 is
-- A call to a null procedure is replaced by a null statement, but we
-- are not allowed to ignore possible side effects of the call, so we
-- make sure that actuals are evaluated.
-- We also suppress this optimization for GNATCoverage.
-- We also suppress this optimization for GNATcoverage.
elsif Is_Null_Procedure (Subp)
and then not Opt.Suppress_Control_Flow_Optimizations

View File

@ -636,7 +636,7 @@ package body Freeze is
-- If Rep_Clauses are to be ignored, remove address clause from
-- list attached to entity, because it may be illegal for gigi,
-- for example by breaking order of elaboration..
-- for example by breaking order of elaboration.
if Ignore_Rep_Clauses then
declare

View File

@ -3967,7 +3967,7 @@ package body Sem_Aggr is
-- Copy the expression so that it is resolved
-- independently for each component, This is needed
-- for accessibility checks on compoents of anonymous
-- for accessibility checks on components of anonymous
-- access types, even in compile_only mode.
if not Inside_A_Generic then

View File

@ -6871,7 +6871,7 @@ package body Sem_Attr is
end if;
-- Verify the consistency of types when the current component is
-- part of a miltiple component update.
-- part of a multiple component update.
-- Comp_1 | ... | Comp_N => <value>
@ -7315,7 +7315,7 @@ package body Sem_Attr is
--------------------
procedure Eval_Attribute (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Loc : constant Source_Ptr := Sloc (N);
C_Type : constant Entity_Id := Etype (N);
-- The type imposed by the context

View File

@ -10030,7 +10030,7 @@ package body Sem_Ch13 is
end if;
end;
-- within a generic unit, prevent a double analysis of the body
-- Within a generic unit, prevent a double analysis of the body
-- which will not be marked analyzed yet. This will happen when
-- the freeze node is created during the preanalysis of an
-- expression function.

View File

@ -181,7 +181,7 @@ package Sem_Ch13 is
-- is the pragma or representation clause itself, used for placing error
-- messages if the item is too late.
--
-- Fonly is a flag that causes only the freezing rule (para 9) to be
-- FOnly is a flag that causes only the freezing rule (para 9) to be
-- applied, and the tests of para 10 are skipped. This is appropriate for
-- both subtype related attributes (Alignment and Size) and for stream
-- attributes, which, although certainly not subtype related attributes,

View File

@ -306,8 +306,6 @@ package body Sem_Ch6 is
-- If the expression is a completion, Prev is the entity whose
-- declaration is completed. Def_Id is needed to analyze the spec.
-- Start of processing for Analyze_Expression_Function
begin
-- This is one of the occasions on which we transform the tree during
-- semantic analysis. If this is a completion, transform the expression

View File

@ -3231,7 +3231,7 @@ package body Sem_Eval is
-- Eval_Op_Not --
-----------------
-- The not operation is a static functions, so the result is potentially
-- The not operation is a static function, so the result is potentially
-- static if the operand is potentially static (RM 4.9(7), 4.9(20)).
procedure Eval_Op_Not (N : Node_Id) is

View File

@ -19256,7 +19256,7 @@ package body Sem_Util is
function Is_True (U : Uint) return Boolean is
begin
return (U /= 0);
return U /= 0;
end Is_True;
--------------------------------------