diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-07-02 14:01:18 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-16 03:34:55 -0400 |
commit | 23a9215f3e68ad91b81e951f09b564c4bc89033c (patch) | |
tree | 07fdc471b4db1f794f4b6197ce5a79414309c3ee /gcc | |
parent | 4b97cbeed9e4538c22f2c1d2bef8429f494735b2 (diff) | |
download | gcc-23a9215f3e68ad91b81e951f09b564c4bc89033c.zip gcc-23a9215f3e68ad91b81e951f09b564c4bc89033c.tar.gz gcc-23a9215f3e68ad91b81e951f09b564c4bc89033c.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/checks.adb | 2 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 4 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 14 | ||||
-rw-r--r-- | gcc/ada/exp_ch6.adb | 19 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_aggr.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_attr.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.ads | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch6.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_eval.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 2 |
12 files changed, 27 insertions, 30 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 539cc04..4eebfd7 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -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. diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index c24588a..ea95cb6 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -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; diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 6f1f368..827704b 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -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 diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index ab237f9..0ad59e8 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -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 diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 248009e..67cda8f 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -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 diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 3ff5cea..e5b18d2 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -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 diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 15d4738..5e5c3df 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -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 diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index e2b8bf8..ce058dd 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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. diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads index 525d3e4..7d9f38d 100644 --- a/gcc/ada/sem_ch13.ads +++ b/gcc/ada/sem_ch13.ads @@ -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, diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index ed1c326..8447411 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -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 diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index f61f905..12f2822 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -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 diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index a246c02..5890b0e 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -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; -------------------------------------- |