]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sem_aggr.adb, [...]: Minor reformatting.
authorRobert Dewar <dewar@adacore.com>
Mon, 20 Jan 2014 13:57:30 +0000 (13:57 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Jan 2014 13:57:30 +0000 (14:57 +0100)
2014-01-20  Robert Dewar  <dewar@adacore.com>

* sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
sem_ch8.adb, exp_dist.adb: Minor reformatting.

From-SVN: r206813

17 files changed:
gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/exp_ch4.adb
gcc/ada/exp_dist.adb
gcc/ada/exp_prag.adb
gcc/ada/expander.adb
gcc/ada/freeze.adb
gcc/ada/g-arrspl.adb
gcc/ada/gnat1drv.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_aux.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch8.adb
gcc/ada/sem_prag.adb
gcc/ada/sinfo.ads

index 1908f6568406dfd72205272bdf005fea043f9eec..f0f8471d4a0b12dc87ac76112084628681094e4f 100644 (file)
@@ -1,3 +1,10 @@
+2014-01-20  Robert Dewar  <dewar@adacore.com>
+
+       * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
+       checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
+       expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
+       sem_ch8.adb, exp_dist.adb: Minor reformatting.
+
 2014-01-20  Yannick Moy  <moy@adacore.com>
 
        * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
index 4801c126e9fed7bc34e000ff1e7d49758c205707..4a3ce980f51217f1b729692467ef22347c604b5b 100644 (file)
@@ -6290,7 +6290,7 @@ package body Checks is
       --  enhanced to check for an always True value in the condition and to
       --  generate a compilation warning???
 
-      if not Expander_Active or else not Checks_On then
+      if not Expander_Active or not Checks_On then
          return;
       end if;
 
index ad65378cffb600d26c33c18d6f554f1dd2e80403..32d430b2ee2feaf531b47fbd3c6893935ab0a588 100644 (file)
@@ -12262,12 +12262,11 @@ package body Exp_Ch4 is
 
             while Present (Par) loop
                if Par = Wrapped_Node
-                    or else
-                  Nkind_In (Par, N_Assignment_Statement,
-                                 N_Object_Declaration,
-                                 N_Pragma,
-                                 N_Procedure_Call_Statement,
-                                 N_Simple_Return_Statement)
+                 or else Nkind_In (Par, N_Assignment_Statement,
+                                        N_Object_Declaration,
+                                        N_Pragma,
+                                        N_Procedure_Call_Statement,
+                                        N_Simple_Return_Statement)
                then
                   Hook_Context := Par;
                   goto Hook_Context_Found;
@@ -12303,13 +12302,14 @@ package body Exp_Ch4 is
 
             Finalize_Always :=
                not (In_Cond_Expr
-                      or else
-                    Nkind_In (Original_Node (N), N_Case_Expression,
-                                                 N_If_Expression));
+                     or else
+                       Nkind_In (Original_Node (N), N_Case_Expression,
+                                                    N_If_Expression));
 
             declare
                Loc  : constant Source_Ptr := Sloc (N);
                Temp : constant Entity_Id := Make_Temporary (Loc, 'E', N);
+
             begin
                Append_To (Actions (N),
                  Make_Object_Declaration (Loc,
index 068a950ba116ab71f896779106b424a5c440a7b0..22d6873f1ddb78a89f800a3c04b9c375b2705bc2 100644 (file)
@@ -9839,7 +9839,7 @@ package body Exp_Dist is
 
                declare
                   Constrained : constant Boolean :=
-                    not Transmit_As_Unconstrained (Typ);
+                                  not Transmit_As_Unconstrained (Typ);
 
                   procedure TA_Ary_Add_Process_Element
                     (Stmts   : List_Id;
@@ -9889,7 +9889,7 @@ package body Exp_Dist is
                begin
                   Set_Expression (Any_Decl,
                     Make_Function_Call (Loc,
-                      Name =>
+                      Name                   =>
                         New_Occurrence_Of (RTE (RE_Create_Any), Loc),
                       Parameter_Associations => New_List (Result_TC)));
                   Result_TC := Empty;
@@ -9899,9 +9899,9 @@ package body Exp_Dist is
                      for J in 1 .. Number_Dimensions (Typ) loop
                         Append_To (Stms,
                           Make_Procedure_Call_Statement (Loc,
-                            Name =>
-                              New_Occurrence_Of (
-                                RTE (RE_Add_Aggregate_Element), Loc),
+                            Name                   =>
+                              New_Occurrence_Of
+                                (RTE (RE_Add_Aggregate_Element), Loc),
                             Parameter_Associations => New_List (
                               New_Occurrence_Of (Any, Loc),
                               Build_To_Any_Call (Loc,
@@ -9949,10 +9949,8 @@ package body Exp_Dist is
 
                   Append_To (Decls,
                     Make_Object_Declaration (Loc,
-                      Defining_Identifier =>
-                        Strm,
-                      Aliased_Present     =>
-                        True,
+                      Defining_Identifier => Strm,
+                      Aliased_Present     => True,
                       Object_Definition   =>
                         New_Occurrence_Of (RTE (RE_Buffer_Stream_Type), Loc)));
 
@@ -9964,6 +9962,7 @@ package body Exp_Dist is
 
                   declare
                      Attr_Name : Name_Id;
+
                   begin
                      if Transmit_As_Unconstrained (Typ) then
                         Attr_Name := Name_Output;
index a1bb03ca78d4b1db35f5a4b5e376604cab39df4f..976e0ea9bc168f52a9d46df9fb602d1d07a4d307 100644 (file)
@@ -639,7 +639,7 @@ package body Exp_Prag is
                     Expression => Make_Identifier (Loc, Chars (Dum))),
 
                   Make_Pragma_Argument_Association (Loc,
-                    Chars => Name_External_Name,
+                    Chars      => Name_External_Name,
                     Expression => Relocate_Node (Rtti_Name))))));
 
             Rewrite (Expression (Foreign_Data),
@@ -654,7 +654,6 @@ package body Exp_Prag is
 
       else
          null;
-
       end if;
    end Expand_Pragma_Import_Or_Interface;
 
index 1fd1bc8a9edfd026667f8301d7f8160e4709679c..760c26457dd9bad7308fd685431eb6874f3a80ce 100644 (file)
@@ -84,14 +84,14 @@ package body Expander is
           and then not (Inside_A_Generic and then Expander_Active));
 
       --  There are three reasons for the Expander_Active flag to be false
-      --
+
       --  The first is when are not generating code. In this mode the
       --  Full_Analysis flag indicates whether we are performing a complete
       --  analysis, in which case Full_Analysis = True or a pre-analysis in
       --  which case Full_Analysis = False. See the spec of Sem for more info
       --  on this. Additionally, the GNATprove_Mode flag indicates that a light
       --  expansion for formal verification should be used.
-      --
+
       --  The second reason for the Expander_Active flag to be False is that
       --  we are performing a pre-analysis. During pre-analysis all expansion
       --  activity is turned off to make sure nodes are semantically decorated
@@ -111,9 +111,7 @@ package body Expander is
       if not (Expander_Active or (Full_Analysis and GNATprove_Mode)) then
          Set_Analyzed (N, Full_Analysis);
 
-         if Serious_Errors_Detected > 0
-           and then Scope_Is_Transient
-         then
+         if Serious_Errors_Detected > 0 and then Scope_Is_Transient then
             Scope_Stack.Table
              (Scope_Stack.Last).Actions_To_Be_Wrapped_Before := No_List;
             Scope_Stack.Table
index 122d6b23cf647188d12d3278c9916b439fa42627..6c283e4fdbf1ab400d2db06c8d4f4fe7dca48012 100644 (file)
@@ -1875,14 +1875,16 @@ package body Freeze is
                      if Ada_Version < Ada_2012 then
                         Error_Msg_N
                           ("current instance must be a limited type",
-                             Prefix (N));
+                           Prefix (N));
                      else
                         Error_Msg_N
-                          ("current instance must be an immutably limited " &
-                            "type (RM-2012, 7.5 (8.1/3))",
-                             Prefix (N));
+                          ("current instance must be an immutably limited "
+                           & "type (RM-2012, 7.5 (8.1/3))",
+                           Prefix (N));
                      end if;
+
                      return Abandon;
+
                   else
                      return OK;
                   end if;
index 82b42b1eba238884f3e8f96b3362c803b0e38a46..2984bb8ed6738b864a50f7fc164620d0ee628768 100644 (file)
@@ -337,8 +337,8 @@ package body GNAT.Array_Split is
          raise Index_Error;
 
       else
-         return S.D.Source
-           (S.D.Slices (Index).Start .. S.D.Slices (Index).Stop);
+         return
+           S.D.Source (S.D.Slices (Index).Start .. S.D.Slices (Index).Stop);
       end if;
    end Slice;
 
index c0ebcfcb6ebc70c4b73fe43aff030ffd724145d3..d380468669cb68a97d728dd0ceb3ee0c31abbb14 100644 (file)
@@ -1262,8 +1262,7 @@ begin
       --  same as the object file produced for compilation.
 
       Write_ALI (Object => (Back_End_Mode = Generate_Object
-                              or else
-                            GNATprove_Mode));
+                             or else GNATprove_Mode));
 
       if not Compilation_Errors then
 
index 73ebeeb7204f2fe01320ef8a276483a251a4e2aa..8593d025786e07e7328ac3e337d009113d0e01f3 100644 (file)
@@ -459,9 +459,7 @@ package body Sem_Aggr is
       --  added in the tree, so that the formal verification can rely on those
       --  to be present.
 
-      if not (Expander_Active or GNATprove_Mode)
-        or In_Spec_Expression
-      then
+      if not (Expander_Active or GNATprove_Mode) or In_Spec_Expression then
          return;
       end if;
 
@@ -1585,7 +1583,7 @@ package body Sem_Aggr is
             Value := Expr_Value (From);
 
          --  If expression From is something like Some_Type'Val (10) then
-         --  Value = 10
+         --  Value = 10.
 
          elsif Nkind (From) = N_Attribute_Reference
            and then Attribute_Name (From) = Name_Val
@@ -1682,7 +1680,6 @@ package body Sem_Aggr is
               (Expr, Nxt_Ind, Nxt_Ind_Constr, Component_Typ, Others_Allowed);
 
          else
-
             --  If it's "... => <>", nothing to resolve
 
             if Nkind (Expr) = N_Component_Association then
index 12c20ac6126602e972a8deea060314e00f37421f..d95af4f82bbbb6fe0db7c8464054413559eea6b3 100644 (file)
@@ -103,6 +103,8 @@ package body Sem_Aux is
       then
          return Class_Wide_Type (Non_Limited_View (Etype (Ent)));
 
+      --  In all other cases, return entity unchanged
+
       else
          return Ent;
       end if;
index 23083cddd88f9efc9fc7cf4f3dc7e735e6ed03b7..bc4deef04947ce90ed9fb442d8381dcdff13e1a6 100644 (file)
@@ -3066,7 +3066,7 @@ package body Sem_Ch10 is
         and then Nkind (Original_Node (Unit)) = N_Package_Instantiation
       then
          return Defining_Entity
-                 (Specification (Instance_Spec (Original_Node (Unit))));
+                  (Specification (Instance_Spec (Original_Node (Unit))));
       elsif Nkind (Unit) = N_Package_Instantiation then
          return Defining_Entity (Specification (Instance_Spec (Unit)));
       else
index f509ba460ca5b4f466594718ed5dece4d8243af9..e0276a6be593326f805e9eadcb0f41532fb3d62d 100644 (file)
@@ -3611,8 +3611,7 @@ package body Sem_Ch12 is
 
          --  Save the instantiation node, for subsequent instantiation of the
          --  body, if there is one and we are generating code for the current
-         --  unit. Mark the unit as having a body, to avoid a premature error
-         --  message.
+         --  unit. Mark unit as having a body (avoids premature error message).
 
          --  We instantiate the body if we are generating code, if we are
          --  generating cross-reference information, or if we are building
@@ -4390,8 +4389,7 @@ package body Sem_Ch12 is
            or else Is_Inlined (Subp)
            or else Is_Inlined (Alias (Subp)))
 
-        --  Must be generating code or analyzing code in ASIS mode or GNATprove
-        --  mode.
+        --  Must be generating code or analyzing code in ASIS/GNATprove mode
 
         and then (Operating_Mode = Generate_Code
                    or else (Operating_Mode = Check_Semantics
index 4ad72dffe2d11192b83260543c800a079a30de45..a7cadbd97df9c90bf871018866043031bd9fbc5a 100644 (file)
@@ -1276,7 +1276,6 @@ package body Sem_Ch6 is
          return;
 
       else
-
          --  Resolve the types of the formals now, because the freeze point
          --  may appear in a different context, e.g. an instantiation.
 
@@ -1362,13 +1361,11 @@ package body Sem_Ch6 is
       Par : constant Node_Id := Parent (N);
 
    begin
-      if        (Nkind (Par) = N_Function_Call
-                  and then N = Name (Par))
+      if        (Nkind (Par) = N_Function_Call and then N = Name (Par))
         or else  Nkind (Par) = N_Function_Instantiation
-        or else (Nkind (Par) = N_Indexed_Component
-                   and then N = Prefix (Par))
+        or else (Nkind (Par) = N_Indexed_Component and then N = Prefix (Par))
         or else (Nkind (Par) = N_Pragma_Argument_Association
-                   and then not Is_Pragma_String_Literal (Par))
+                  and then not Is_Pragma_String_Literal (Par))
         or else  Nkind (Par) = N_Subprogram_Renaming_Declaration
         or else (Nkind (Par) = N_Attribute_Reference
                   and then Attribute_Name (Par) /= Name_Value)
index f5c96acea18cb739c4b9e87692e9242f1249ba0e..fecfcc89e9e4374ab8bde00f6f2f20a7769b40aa 100644 (file)
@@ -5262,8 +5262,7 @@ package body Sem_Ch8 is
                      Candidate        := Non_Limited_View (Id);
                      Is_New_Candidate := True;
 
-                  --  Hide the candidate because it is not used in a proper
-                  --  context.
+                  --  Hide candidate because it is not used in a proper context
 
                   else
                      Candidate        := Empty;
index b9773742d9c5e1962a9a7f21aa9f32fc62884894..38dad25490349f94ad9060bcf88fd8943a600333 100644 (file)
@@ -4607,7 +4607,7 @@ package body Sem_Prag is
             --  where there is no later point at which the aspect will be
             --  analyzed.
 
-            if GNATprove_Mode or else ASIS_Mode then
+            if GNATprove_Mode or ASIS_Mode then
                Analyze_Pre_Post_Condition_In_Decl_Part
                  (N, Defining_Entity (Unit (Parent (PO))));
             end if;
index 173ae54df41c152d24dd3ff3f0402216c2a30fc8..4496672decebf723b74984f3d2b5c9b891d2b71d 100644 (file)
@@ -519,12 +519,12 @@ package Sinfo is
    --  This light expansion does two transformations of the tree, that cannot
    --  be postponed after the frontend semantic analysis:
 
-   --    1. Replace object renamings by renamed object. This requires
-   --       introducing temporaries at the point of the renaming, which must be
-   --       properly analyzed.
+   --    1. Replace object renamings by renamed object. This requires the
+   --       introdtion of temporaries at the point of the renaming, which must
+   --       be properly analyzed.
 
    --    2. Fully qualify entity names. This is needed to generate suitable
-   --       local effects/call-graphs in ALI files, with the completely
+   --       local effects and call-graphs in ALI files, with the completely
    --       qualified names (in particular the suffix to distinguish homonyms).
 
    --  The tree after this light expansion should be fully analyzed
@@ -553,7 +553,7 @@ package Sinfo is
    -- Common Flag Fields --
    ------------------------
 
-   --  The following flag fields appear in all nodes
+   --  The following flag fields appear in all nodes:
 
    --  Analyzed
    --    This flag is used to indicate that a node (and all its children have