diff mbox series

[Ada] Remove extra space after assignment symbol

Message ID 20211202162847.GA2158389@adacore.com
State New
Headers show
Series [Ada] Remove extra space after assignment symbol | expand

Commit Message

Pierre-Marie de Rodat Dec. 2, 2021, 4:28 p.m. UTC
Fix style issues in GNAT after spotting a similar problem in one of the
tests for GNATprove. These are easy to find with grep, but still require
a manual inspection, because we want to preserve layout in declaration
lists like:

  A :=   1;
  B :=  10;
  C := 100;

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

gcc/ada/

	* exp_aggr.adb, exp_ch6.adb, par-ch4.adb, sem_ch13.adb: Remove
	extra space after ":=" symbol.
	* gen_il-gen.adb: Likewise; add missing headerbox.
diff mbox series

Patch

diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -7546,11 +7546,11 @@  package body Exp_Aggr is
                  Parameter_Associations => Params));
          end if;
 
-         Loop_Stat :=  Make_Implicit_Loop_Statement
-                         (Node             => N,
-                          Identifier       => Empty,
-                          Iteration_Scheme => L_Iteration_Scheme,
-                          Statements       => Stats);
+         Loop_Stat := Make_Implicit_Loop_Statement
+                        (Node             => N,
+                         Identifier       => Empty,
+                         Iteration_Scheme => L_Iteration_Scheme,
+                         Statements       => Stats);
          Append (Loop_Stat, Aggr_Code);
 
       end Expand_Iterated_Component;
@@ -7825,7 +7825,7 @@  package body Exp_Aggr is
                --  required size for the aggregwte : call the provided
                --  constructor rather than the Empty aggregate.
 
-               Index :=  Make_Op_Add (Loc,
+               Index := Make_Op_Add (Loc,
                  Left_Opnd => New_Copy_Tree (Type_Low_Bound (Index_Type)),
                  Right_Opnd => Make_Integer_Literal (Loc, Siz - 1));
 


diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -10206,7 +10206,7 @@  package body Exp_Ch6 is
       --  If function is inherited, a conversion may be necessary.
 
       if Nkind (Par) = N_Assignment_Statement then
-         Last_Actual :=  Name (Par);
+         Last_Actual := Name (Par);
 
          if not Comes_From_Source (Orig_Func)
            and then Etype (Orig_Func) /= Etype (Func_Id)


diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb
--- a/gcc/ada/gen_il-gen.adb
+++ b/gcc/ada/gen_il-gen.adb
@@ -2135,9 +2135,13 @@  package body Gen_IL.Gen is
 
                procedure One_Comp (F : Field_Enum);
 
+               --------------
+               -- One_Comp --
+               --------------
+
                procedure One_Comp (F : Field_Enum) is
                   pragma Annotate (Codepeer, Modified, Field_Table);
-                  Offset : constant Field_Offset :=  Field_Table (F).Offset;
+                  Offset : constant Field_Offset := Field_Table (F).Offset;
                begin
                   if First_Time then
                      First_Time := False;


diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -3482,7 +3482,7 @@  package body Ch4 is
            New_Node (N_Loop_Parameter_Specification, Prev_Token_Ptr);
          Set_Defining_Identifier (Loop_Spec, Id);
 
-         Choice :=  First (Discrete_Choices (Assoc_Node));
+         Choice := First (Discrete_Choices (Assoc_Node));
          Assoc_Node :=
            New_Node (N_Iterated_Element_Association, Prev_Token_Ptr);
          Set_Loop_Parameter_Specification (Assoc_Node, Loop_Spec);


diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -15550,7 +15550,7 @@  package body Sem_Ch13 is
             Add_Unnamed_Subp := Subp;
 
          elsif Op_Name = Name_New_Indexed then
-            New_Indexed_Subp :=  Subp;
+            New_Indexed_Subp := Subp;
 
          elsif Op_Name = Name_Assign_Indexed then
             Assign_Indexed_Subp := Subp;