diff mbox series

[Ada] Fix repeated words and typos in doc and comments

Message ID 20191212100431.GA114767@adacore.com
State New
Headers show
Series [Ada] Fix repeated words and typos in doc and comments | expand

Commit Message

Pierre-Marie de Rodat Dec. 12, 2019, 10:04 a.m. UTC
Found with 'grep " \([[:alpha:]]\+\) \1[[:space:]]" *.ad?', just like in
2015; fixed manually with refilling comments where possible.

Tested on x86_64-pc-linux-gnu, committed on trunk

2019-12-12  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* libgnat/g-altive.ads: Fix typo in comment.
	* bindo-graphs.adb: Fix repeated words in comment.
	* exp_ch4.adb: Likewise.
	* exp_ch5.adb: Likewise.
	* exp_ch7.adb: Likewise.
	* exp_pakd.adb: Likewise.
	* exp_unst.adb: Likewise.
	* exp_util.adb: Likewise.
	* freeze.adb: Likewise.
	* inline.adb: Likewise.
	* layout.adb: Likewise.
	* sem_ch12.adb: Likewise.
	* sem_ch13.adb: Likewise.
	* sem_ch4.adb: Likewise.
	* sem_ch9.adb: Likewise.
	* sem_elab.adb: Likewise.
	* doc/gnat_ugn/gnat_and_program_execution.rst: Fix repeated
	words in user documentation.
	* gnat_ugn.texi: Regenerate.
diff mbox series

Patch

--- gcc/ada/bindo-graphs.adb
+++ gcc/ada/bindo-graphs.adb
@@ -1676,7 +1676,7 @@  package body Bindo.Graphs is
          --  successor and predecessor are kept consistent in both cases, and
          --  Add_Edge_With_Return will prevent the creation of the second edge.
 
-         --  Assume that that no Body_Before_Spec is necessary
+         --  Assume that no Body_Before_Spec is necessary
 
          Edge := No_Library_Graph_Edge;
 

--- gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
+++ gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
@@ -1214,8 +1214,7 @@  for more information.
 Profiling
 =========
 
-This section describes how to use the the ``gprof`` profiler tool on Ada
-programs.
+This section describes how to use the ``gprof`` profiler tool on Ada programs.
 
 .. index:: !  gprof
 .. index:: Profiling

--- gcc/ada/exp_ch4.adb
+++ gcc/ada/exp_ch4.adb
@@ -11840,7 +11840,7 @@  package body Exp_Ch4 is
            --  The case where the target type is an anonymous access type of
            --  a discriminant is excluded, because the level of such a type
            --  depends on the context and currently the level returned for such
-           --  types is zero, resulting in warnings about about check failures
+           --  types is zero, resulting in warnings about check failures
            --  in certain legal cases involving class-wide interfaces as the
            --  designated type (some cases, such as return statements, are
            --  checked at run time, but not clear if these are handled right
@@ -12320,8 +12320,8 @@  package body Exp_Ch4 is
 
    --  Remove the unchecked expression node from the tree. Its job was simply
    --  to make sure that its constituent expression was handled with checks
-   --  off, and now that that is done, we can remove it from the tree, and
-   --  indeed must, since Gigi does not expect to see these nodes.
+   --  off, and now that is done, we can remove it from the tree, and indeed
+   --  must, since Gigi does not expect to see these nodes.
 
    procedure Expand_N_Unchecked_Expression (N : Node_Id) is
       Exp : constant Node_Id := Expression (N);

--- gcc/ada/exp_ch5.adb
+++ gcc/ada/exp_ch5.adb
@@ -1065,8 +1065,8 @@  package body Exp_Ch5 is
                end if;
 
                --  Reset the Analyzed flag, because the bounds of the index
-               --  type itself may be universal, and must must be reanalyzed
-               --  to acquire the proper type for the back end.
+               --  type itself may be universal, and must be reanalyzed to
+               --  acquire the proper type for the back end.
 
                Set_Analyzed (Cleft_Lo, False);
                Set_Analyzed (Cright_Lo, False);

--- gcc/ada/exp_ch7.adb
+++ gcc/ada/exp_ch7.adb
@@ -376,7 +376,7 @@  package body Exp_Ch7 is
 
    procedure Check_Unnesting_In_Decls_Or_Stmts (Decls_Or_Stmts : List_Id);
    --  Similarly, the declarations or statements in library-level packages may
-   --  have created blocks blocks with nested subprograms. Such a block must be
+   --  have created blocks with nested subprograms. Such a block must be
    --  transformed into a procedure followed by a call to it, so that unnesting
    --  can handle uplevel references within these nested subprograms (typically
    --  subprograms that handle finalization actions). This also applies to

--- gcc/ada/exp_pakd.adb
+++ gcc/ada/exp_pakd.adb
@@ -1564,7 +1564,7 @@  package body Exp_Pakd is
          Silly_Boolean_Array_Xor_Test (N, R, Rtyp);
       end if;
 
-      --  Now that that silliness is taken care of, get packed array type
+      --  Now that silliness is taken care of, get packed array type
 
       Convert_To_PAT_Type (L);
       Convert_To_PAT_Type (R);

--- gcc/ada/exp_unst.adb
+++ gcc/ada/exp_unst.adb
@@ -526,8 +526,8 @@  package body Exp_Unst is
                procedure Note_Uplevel_Bound (N : Node_Id; Ref : Node_Id) is
                begin
                   --  Entity name case. Make sure that the entity is declared
-                  --  in a subprogram. This may not be the case for for a type
-                  --  in a loop appearing in a precondition.
+                  --  in a subprogram. This may not be the case for a type in a
+                  --  loop appearing in a precondition.
                   --  Exclude explicitly  discriminants (that can appear
                   --  in bounds of discriminated components).
 

--- gcc/ada/exp_util.adb
+++ gcc/ada/exp_util.adb
@@ -9718,7 +9718,7 @@  package body Exp_Util is
       end if;
 
       --  Do not generate a check within an internal subprogram (stream
-      --  functions and the like, including including predicate functions).
+      --  functions and the like, including predicate functions).
 
       if Within_Internal_Subprogram then
          return Make_Null_Statement (Loc);

--- gcc/ada/freeze.adb
+++ gcc/ada/freeze.adb
@@ -1502,7 +1502,7 @@  package body Freeze is
 
             --  In GNATprove mode this is where we can collect the inherited
             --  conditions, because we do not create the Check pragmas that
-            --  normally convey the the modified class-wide conditions on
+            --  normally convey the modified class-wide conditions on
             --  overriding operations.
 
             if GNATprove_Mode then

--- gcc/ada/gnat_ugn.texi
+++ gcc/ada/gnat_ugn.texi
@@ -21,7 +21,7 @@ 
 
 @copying
 @quotation
-GNAT User's Guide for Native Platforms , Oct 09, 2019
+GNAT User's Guide for Native Platforms , Dec 10, 2019
 
 AdaCore
 
@@ -20730,8 +20730,7 @@  for more information.
 @section Profiling
 
 
-This section describes how to use the the @code{gprof} profiler tool on Ada
-programs.
+This section describes how to use the @code{gprof} profiler tool on Ada programs.
 
 @geindex gprof
 

--- gcc/ada/inline.adb
+++ gcc/ada/inline.adb
@@ -256,7 +256,7 @@  package body Inline is
    --  the call is in the main compilation unit, Caller is Empty.
 
    procedure Add_Inlined_Instance (E : Entity_Id);
-   --  Add instance E to the list of of inlined instances for the unit
+   --  Add instance E to the list of inlined instances for the unit
 
    procedure Add_Inlined_Subprogram (E : Entity_Id);
    --  Add subprogram E to the list of inlined subprograms for the unit

--- gcc/ada/layout.adb
+++ gcc/ada/layout.adb
@@ -764,9 +764,9 @@  package body Layout is
          end if;
 
          --  Check components. If any component requires a higher alignment,
-         --  then we set that higher alignment in any case. Don't do this if
-         --  we have Optimize_Alignment set to Space. Note that that covers
-         --  the case of packed records, where we already set alignment to 1.
+         --  then we set that higher alignment in any case. Don't do this if we
+         --  have Optimize_Alignment set to Space. Note that covers the case of
+         --  packed records, where we already set alignment to 1.
 
          if not Optimize_Alignment_Space (E) then
             declare

--- gcc/ada/libgnat/g-altive.ads
+++ gcc/ada/libgnat/g-altive.ads
@@ -494,7 +494,7 @@  end GNAT.Altivec;
 
 --  The central idea for the Ada bindings is to leverage on the existing GCC
 --  architecture, with the introduction of a Low_Level_Vectors abstraction.
---  This abstaction acts as a representative of the vector-types and builtins
+--  This abstraction acts as a representative of the vector-types and builtins
 --  compiler interface for either the Hard or the Soft case.
 
 --  For the Hard binding, Low_Level_Vectors exposes data types with a GCC

--- gcc/ada/sem_ch12.adb
+++ gcc/ada/sem_ch12.adb
@@ -4501,7 +4501,7 @@  package body Sem_Ch12 is
          --  the case of nested instances for the time being.
 
          --  When we generate a nested instance body, calling stubs for any
-         --  relevant subprogram will be be inserted immediately after the
+         --  relevant subprogram will be inserted immediately after the
          --  subprogram declarations, and will take precedence over the
          --  subsequent (original) body. (The stub and original body will be
          --  complete homographs, but this is permitted in an instance).
@@ -5431,8 +5431,8 @@  package body Sem_Ch12 is
                   Instantiating => True),
              Name          => New_Occurrence_Of (Anon_Id, Loc));
 
-         --  The generic may be a a child unit. The renaming needs an
-         --  identifier with the proper name.
+         --  The generic may be a child unit. The renaming needs an identifier
+         --  with the proper name.
 
          Set_Defining_Unit_Name (Specification (Unit_Renaming),
             Make_Defining_Identifier (Loc, Chars (Gen_Unit)));

--- gcc/ada/sem_ch13.adb
+++ gcc/ada/sem_ch13.adb
@@ -770,8 +770,8 @@  package body Sem_Ch13 is
                   --     1 .. 4       3 .. 6         1         3
                   --     4 .. 7       0 .. 3         4         0
 
-                  --  The rule is that the first bit is is obtained by
-                  --  subtracting the old ending bit from storage_unit - 1.
+                  --  The rule is that the first bit is obtained by subtracting
+                  --  the old ending bit from storage_unit - 1.
 
                   Set_Component_Bit_Offset (Comp,
                     (Storage_Unit_Offset * System_Storage_Unit) +
@@ -13344,9 +13344,9 @@  package body Sem_Ch13 is
                   =>
                      --  Build predicate function specification and preanalyze
                      --  expression after type replacement. The function
-                     --  declaration must be analyzed in the scope of the
-                     --  type, but the the expression can reference components
-                     --  and discriminants of the type.
+                     --  declaration must be analyzed in the scope of the type,
+                     --  but the expression can reference components and
+                     --  discriminants of the type.
 
                      if No (Predicate_Function (E)) then
                         declare

--- gcc/ada/sem_ch4.adb
+++ gcc/ada/sem_ch4.adb
@@ -1555,7 +1555,7 @@  package body Sem_Ch4 is
             --  there is only a limited view of it and there is nothing in
             --  the context of the current unit that has required a regular
             --  compilation of the unit containing the type. We recognize
-            --  this unusual case by the fact that that unit is not analyzed.
+            --  this unusual case by the fact that unit is not analyzed.
             --  Note that the call being analyzed is in a different unit from
             --  the function declaration, and nothing indicates that the type
             --  is a limited view.

--- gcc/ada/sem_ch9.adb
+++ gcc/ada/sem_ch9.adb
@@ -2758,7 +2758,7 @@  package body Sem_Ch9 is
       Insert_After (N, Obj_Decl);
       Mark_Rewrite_Insertion (Obj_Decl);
 
-      --  Relocate aspect Part_Of from the the original single protected
+      --  Relocate aspect Part_Of from the original single protected
       --  declaration to the anonymous object declaration. This emulates the
       --  placement of an equivalent source pragma.
 

--- gcc/ada/sem_elab.adb
+++ gcc/ada/sem_elab.adb
@@ -1457,7 +1457,7 @@  package body Sem_Elab is
       -- Types --
       -----------
 
-      --  The following type enumerates all possible Ghost mode mode kinds
+      --  The following type enumerates all possible Ghost mode kinds
 
       type Extended_Ghost_Mode is
         (Is_Ignored,
@@ -4963,7 +4963,7 @@  package body Sem_Elab is
             Output_Active_Scenarios (Attr, New_In_State);
          end if;
 
-         --  Treat the attribute an an immediate invocation of the target when
+         --  Treat the attribute an immediate invocation of the target when
          --  switch -gnatd.o (conservative elaboration order for indirect
          --  calls) is in effect. This has the following desirable effects:
          --
@@ -10015,8 +10015,8 @@  package body Sem_Elab is
       function Find_Enclosing_Context (N : Node_Id) return Node_Id;
       pragma Inline (Find_Enclosing_Context);
       --  Return the nearest enclosing non-library-level or compilation unit
-      --  node which which encapsulates arbitrary node N. Return Empty is no
-      --  such context is available.
+      --  node which encapsulates arbitrary node N. Return Empty is no such
+      --  context is available.
 
       function In_Nested_Context
         (Outer : Node_Id;
@@ -10916,8 +10916,8 @@  package body Sem_Elab is
          Spec_Id : Entity_Id;
 
       begin
-         --  The the task type has already been expanded, it carries the
-         --  procedure which emulates the behavior of the task body.
+         --  The task type has already been expanded, it carries the procedure
+         --  which emulates the behavior of the task body.
 
          if Present (Task_Body_Id) then
             Spec_Id := Task_Body_Id;
@@ -10951,8 +10951,8 @@  package body Sem_Elab is
          Spec_Id : Entity_Id;
 
       begin
-         --  The the task type has already been expanded, it carries the
-         --  procedure which emulates the behavior of the task body.
+         --  The task type has already been expanded, it carries the procedure
+         --  which emulates the behavior of the task body.
 
          if Present (Task_Body_Id) then
             Spec_Id := Task_Body_Id;