public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-197] [Ada] Remove extra space around binary operators
@ 2022-05-09  9:32 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-09  9:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a746131d375283f28e6e0a3e45bddffb6d1ebfcd

commit r13-197-ga746131d375283f28e6e0a3e45bddffb6d1ebfcd
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Tue Jan 18 01:08:53 2022 +0100

    [Ada] Remove extra space around binary operators
    
    Style cleanups. Violation initially spotted while reading the code for
    UI_Expon; other occurrences found with grep (and examined manually,
    because sometimes the extra space is needed for a code layout).
    
    gcc/ada/
    
            * bindgen.adb, errout.adb, exp_unst.adb, gnatchop.adb,
            libgnat/a-ngcefu.adb, libgnat/a-strunb.adb,
            libgnat/a-stwiun.adb, libgnat/a-stzunb.adb,
            libgnat/a-wtedit.adb, libgnat/g-debpoo.adb, osint.adb,
            sigtramp-vxworks.c, uintp.adb: Remove extra whitespace around +,
            -, *, / and **.

Diff:
---
 gcc/ada/bindgen.adb          |  2 +-
 gcc/ada/errout.adb           |  2 +-
 gcc/ada/exp_unst.adb         |  2 +-
 gcc/ada/gnatchop.adb         |  2 +-
 gcc/ada/libgnat/a-ngcefu.adb |  6 +++---
 gcc/ada/libgnat/a-strunb.adb |  2 +-
 gcc/ada/libgnat/a-stwiun.adb |  2 +-
 gcc/ada/libgnat/a-stzunb.adb |  2 +-
 gcc/ada/libgnat/a-wtedit.adb |  4 ++--
 gcc/ada/libgnat/g-debpoo.adb |  4 ++--
 gcc/ada/osint.adb            |  8 ++++----
 gcc/ada/sigtramp-vxworks.c   | 10 +++++-----
 gcc/ada/uintp.adb            |  2 +-
 13 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index eec9dd5fbb6..d7ba26798e5 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -2907,7 +2907,7 @@ package body Bindgen is
             Nlen := Name'Length;
             Name (Name'Last) := Character'Val (J mod 10 + Character'Pos ('0'));
             Name (Name'Last - 1) :=
-              Character'Val (J /   10 + Character'Pos ('0'));
+              Character'Val (J / 10 + Character'Pos ('0'));
          end if;
 
          for K in ALIs.First .. ALIs.Last loop
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index f506bccb7ed..44d461f315b 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -3876,7 +3876,7 @@ package body Errout is
       --  dealing with some cases of internal names).
 
       while Name_Len > 1 and then Name_Buffer (Name_Len) in 'A' .. 'Z' loop
-         Name_Len := Name_Len  - 1;
+         Name_Len := Name_Len - 1;
       end loop;
 
       --  If we have any of the names from standard that start with the
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index 90a626f48fd..2fb92990840 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -856,7 +856,7 @@ package body Exp_Unst is
                      S : Entity_Id := E;
 
                   begin
-                     for J in reverse 1 .. L  - 1 loop
+                     for J in reverse 1 .. L - 1 loop
                         S := Enclosing_Subprogram (S);
                         Subps.Table (Subp_Index (S)).Reachable := True;
                      end loop;
diff --git a/gcc/ada/gnatchop.adb b/gcc/ada/gnatchop.adb
index 01999716ef4..03ad454b2e3 100644
--- a/gcc/ada/gnatchop.adb
+++ b/gcc/ada/gnatchop.adb
@@ -721,7 +721,7 @@ procedure Gnatchop is
       begin
          Parse_Token (Source, Parse_Ptr, Token_Ptr);
 
-         if Source'Last  + 1 - Token_Ptr < Literal'Length
+         if Source'Last + 1 - Token_Ptr < Literal'Length
            or else
              Source (Token_Ptr .. Token_Ptr + Literal'Length - 1) /= Literal
          then
diff --git a/gcc/ada/libgnat/a-ngcefu.adb b/gcc/ada/libgnat/a-ngcefu.adb
index eccb5602bcd..56beb0fa376 100644
--- a/gcc/ada/libgnat/a-ngcefu.adb
+++ b/gcc/ada/libgnat/a-ngcefu.adb
@@ -225,7 +225,7 @@ package body Ada.Numerics.Generic_Complex_Elementary_Functions is
       elsif abs Re (X) > 1.0 / Epsilon or else
             abs Im (X) > 1.0 / Epsilon
       then
-         Xt := Complex_One  /  X;
+         Xt := Complex_One / X;
 
          if Re (X) < 0.0 then
             Set_Re (Xt, PI - Re (Xt));
@@ -442,7 +442,7 @@ package body Ada.Numerics.Generic_Complex_Elementary_Functions is
       if abs Re (X) < Square_Root_Epsilon and then
          abs Im (X) < Square_Root_Epsilon
       then
-         return Complex_One  /  X;
+         return Complex_One / X;
 
       elsif Im (X) > Log_Inverse_Epsilon_2 then
          return -Complex_I;
@@ -463,7 +463,7 @@ package body Ada.Numerics.Generic_Complex_Elementary_Functions is
       if abs Re (X) < Square_Root_Epsilon and then
          abs Im (X) < Square_Root_Epsilon
       then
-         return Complex_One  /  X;
+         return Complex_One / X;
 
       elsif Re (X) > Log_Inverse_Epsilon_2 then
          return Complex_One;
diff --git a/gcc/ada/libgnat/a-strunb.adb b/gcc/ada/libgnat/a-strunb.adb
index e97ee3d54dc..f8e880eecfa 100644
--- a/gcc/ada/libgnat/a-strunb.adb
+++ b/gcc/ada/libgnat/a-strunb.adb
@@ -721,7 +721,7 @@ package body Ada.Strings.Unbounded is
       Realloc_For_Chunk (Source, New_Item'Length);
 
       Source.Reference
-        (Before +  New_Item'Length .. Source.Last + New_Item'Length) :=
+        (Before + New_Item'Length .. Source.Last + New_Item'Length) :=
            Source.Reference (Before .. Source.Last);
 
       Source.Reference (Before .. Before + New_Item'Length - 1) := New_Item;
diff --git a/gcc/ada/libgnat/a-stwiun.adb b/gcc/ada/libgnat/a-stwiun.adb
index 76fc2eabddc..8773a621f20 100644
--- a/gcc/ada/libgnat/a-stwiun.adb
+++ b/gcc/ada/libgnat/a-stwiun.adb
@@ -718,7 +718,7 @@ package body Ada.Strings.Wide_Unbounded is
       Realloc_For_Chunk (Source, New_Item'Length);
 
       Source.Reference
-        (Before +  New_Item'Length .. Source.Last + New_Item'Length) :=
+        (Before + New_Item'Length .. Source.Last + New_Item'Length) :=
            Source.Reference (Before .. Source.Last);
 
       Source.Reference (Before .. Before + New_Item'Length - 1) := New_Item;
diff --git a/gcc/ada/libgnat/a-stzunb.adb b/gcc/ada/libgnat/a-stzunb.adb
index 34cbc322501..a92714cdcf3 100644
--- a/gcc/ada/libgnat/a-stzunb.adb
+++ b/gcc/ada/libgnat/a-stzunb.adb
@@ -726,7 +726,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is
       Realloc_For_Chunk (Source, New_Item'Length);
 
       Source.Reference
-        (Before +  New_Item'Length .. Source.Last + New_Item'Length) :=
+        (Before + New_Item'Length .. Source.Last + New_Item'Length) :=
            Source.Reference (Before .. Source.Last);
 
       Source.Reference (Before .. Before + New_Item'Length - 1) := New_Item;
diff --git a/gcc/ada/libgnat/a-wtedit.adb b/gcc/ada/libgnat/a-wtedit.adb
index 64bb9890511..9b9f70269b8 100644
--- a/gcc/ada/libgnat/a-wtedit.adb
+++ b/gcc/ada/libgnat/a-wtedit.adb
@@ -246,8 +246,8 @@ package body Ada.Wide_Text_IO.Editing is
 
                   else
                      Count := Count * 10
-                                +  Character'Pos (Picture (Last)) -
-                                   Character'Pos ('0');
+                                + Character'Pos (Picture (Last)) -
+                                  Character'Pos ('0');
                   end if;
 
                   Last := Last + 1;
diff --git a/gcc/ada/libgnat/g-debpoo.adb b/gcc/ada/libgnat/g-debpoo.adb
index ecab282f14b..6e0cf1048c7 100644
--- a/gcc/ada/libgnat/g-debpoo.adb
+++ b/gcc/ada/libgnat/g-debpoo.adb
@@ -791,7 +791,7 @@ package body GNAT.Debug_Pools is
 
          declare
             Block_Number : constant Integer_Address :=
-                             Int_Storage /  Memory_Chunk_Size;
+                             Int_Storage / Memory_Chunk_Size;
             Ptr          : constant Validity_Bits_Ref :=
                              Validy_Htable.Get (Block_Number);
             Offset       : constant Integer_Address :=
@@ -844,7 +844,7 @@ package body GNAT.Debug_Pools is
       procedure Set_Valid (Storage : System.Address; Value : Boolean) is
          Int_Storage  : constant Integer_Address := To_Integer (Storage);
          Block_Number : constant Integer_Address :=
-                          Int_Storage /  Memory_Chunk_Size;
+                          Int_Storage / Memory_Chunk_Size;
          Ptr          : Validity_Bits_Ref := Validy_Htable.Get (Block_Number);
          Offset       : constant Integer_Address :=
                           (Int_Storage - (Block_Number * Memory_Chunk_Size)) /
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
index 3ac4fd582c5..af76dc7b4f9 100644
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -1971,9 +1971,9 @@ package body Osint is
    function Nb_Dir_In_Obj_Search_Path return Natural is
    begin
       if Opt.Look_In_Primary_Dir then
-         return Lib_Search_Directories.Last -  Primary_Directory + 1;
+         return Lib_Search_Directories.Last - Primary_Directory + 1;
       else
-         return Lib_Search_Directories.Last -  Primary_Directory;
+         return Lib_Search_Directories.Last - Primary_Directory;
       end if;
    end Nb_Dir_In_Obj_Search_Path;
 
@@ -1984,9 +1984,9 @@ package body Osint is
    function Nb_Dir_In_Src_Search_Path return Natural is
    begin
       if Opt.Look_In_Primary_Dir then
-         return Src_Search_Directories.Last -  Primary_Directory + 1;
+         return Src_Search_Directories.Last - Primary_Directory + 1;
       else
-         return Src_Search_Directories.Last -  Primary_Directory;
+         return Src_Search_Directories.Last - Primary_Directory;
       end if;
    end Nb_Dir_In_Src_Search_Path;
 
diff --git a/gcc/ada/sigtramp-vxworks.c b/gcc/ada/sigtramp-vxworks.c
index 138e3d001a0..357a834082b 100644
--- a/gcc/ada/sigtramp-vxworks.c
+++ b/gcc/ada/sigtramp-vxworks.c
@@ -49,15 +49,15 @@
 
 typedef struct mcontext
   {
-    REG_SET     regs;
+    REG_SET regs;
   } mcontext_t;
 
 typedef struct ucontext
   {
-    mcontext_t          uc_mcontext;    /* register set */
-    struct ucontext *   uc_link;        /* not used */
-    sigset_t            uc_sigmask;     /* set of signals blocked */
-    stack_t             uc_stack;       /* stack of context signaled */
+    mcontext_t        uc_mcontext;    /* register set */
+    struct ucontext * uc_link;        /* not used */
+    sigset_t          uc_sigmask;     /* set of signals blocked */
+    stack_t           uc_stack;       /* stack of context signaled */
   } ucontext_t;
 #endif
 
diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb
index 5c1306102db..854d2e167b0 100644
--- a/gcc/ada/uintp.adb
+++ b/gcc/ada/uintp.adb
@@ -1431,7 +1431,7 @@ package body Uintp is
 
             N := N / Uint_2;
             exit when N = Uint_0;
-            Squares := Squares *  Squares;
+            Squares := Squares * Squares;
          end loop;
 
          Uintp.Release_And_Save (M, Result);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-09  9:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  9:32 [gcc r13-197] [Ada] Remove extra space around binary operators Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).