[gcc r15-1483] ada: Fix style in freezing code

Marc Poulhi?s dkm@gcc.gnu.org
Thu Jun 20 08:54:10 GMT 2024


https://gcc.gnu.org/g:42305c7a3acb29b7bedef4d90dbbe032a5f985c5

commit r15-1483-g42305c7a3acb29b7bedef4d90dbbe032a5f985c5
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Wed May 15 10:58:04 2024 +0200

    ada: Fix style in freezing code
    
    Code cleanup; semantics is unaffected.
    
    gcc/ada/
    
            * freeze.adb (Find_Aspect_No_Parts): Tune whitespace.
            * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Fix style.

Diff:
---
 gcc/ada/freeze.adb   | 8 +++-----
 gcc/ada/sem_ch13.adb | 6 +++---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 452e11fc747e..2fcc2ce02e71 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -3201,9 +3201,7 @@ package body Freeze is
                --  Search through aspects present on the private type
 
                while Present (Curr_Aspect_Spec) loop
-                  if Get_Aspect_Id (Curr_Aspect_Spec)
-                       = Aspect_No_Parts
-                  then
+                  if Get_Aspect_Id (Curr_Aspect_Spec) = Aspect_No_Parts then
                      Aspect_Spec := Curr_Aspect_Spec;
                      exit;
                   end if;
@@ -8906,8 +8904,8 @@ package body Freeze is
       --  Now we have the right place to do the freezing. First, a special
       --  adjustment, if we are in spec-expression analysis mode, these freeze
       --  actions must not be thrown away (normally all inserted actions are
-      --  thrown away in this mode. However, the freeze actions are from static
-      --  expressions and one of the important reasons we are doing this
+      --  thrown away in this mode). However, the freeze actions are from
+      --  static expressions and one of the important reasons we are doing this
       --  special analysis is to get these freeze actions. Therefore we turn
       --  off the In_Spec_Expression mode to propagate these freeze actions.
       --  This also means they get properly analyzed and expanded.
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index f2f1b0cb8538..f65217b0b908 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -11003,10 +11003,10 @@ package body Sem_Ch13 is
       --  Expression to be analyzed at end of declarations
 
       Freeze_Expr : constant Node_Id := Expression (ASN);
-      --  Expression from call to Check_Aspect_At_Freeze_Point.
+      --  Expression from call to Check_Aspect_At_Freeze_Point
 
       T : constant Entity_Id :=
-            (if Present (Freeze_Expr) and A_Id /= Aspect_Stable_Properties
+            (if Present (Freeze_Expr) and then A_Id /= Aspect_Stable_Properties
              then Etype (Original_Node (Freeze_Expr))
              else Empty);
       --  Type required for preanalyze call. We use the original expression to
@@ -11073,7 +11073,7 @@ package body Sem_Ch13 is
       if In_Instance then
          return;
 
-      --  The enclosing scope may have been rewritten during expansion (.e.g. a
+      --  The enclosing scope may have been rewritten during expansion (e.g. a
       --  task body is rewritten as a procedure) after this conformance check
       --  has been performed, so do not perform it again (it may not easily be
       --  done if full visibility of local entities is not available).


More information about the Gcc-cvs mailing list