]> gcc.gnu.org Git - gcc.git/commitdiff
ada: Style fixes: remove blank lines following 'begin' keywords
authorGhjuvan Lacambre <lacambre@adacore.com>
Tue, 2 Jul 2024 09:26:19 +0000 (11:26 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 1 Aug 2024 15:14:37 +0000 (17:14 +0200)
The GNAT style guide specifies that there must not be blank lines after
'begin' keywords.

gcc/ada/

* backend_utils.adb (Scan_Common_Back_End_Switch): Remove blank
line.
* errout.adb (Output_JSON_Message): Likewise.
* erroutc.adb (Set_Msg_Char): Likewise.
* exp_aggr.adb (Two_Dim_Packed_Array_Handled): Likewise.
* exp_pakd.adb (Expand_Packed_Address_Reference): Likewise.
(Expand_Packed_Bit_Reference): Likewise.
(Expand_Packed_Boolean_Operator): Likewise.
(Expand_Packed_Element_Reference): Likewise.
(Expand_Packed_Eq): Likewise.
(Expand_Packed_Not): Likewise.
* exp_prag.adb (Build_Dim3_Declaration): Likewise.
* exp_strm.adb (Build_Elementary_Input_Call): Likewise.
* freeze.adb (Find_Aspect_No_Parts): Likewise.
(Get_Aspect_No_Parts_Value): Likewise.
* gen_il-gen.adb (Compile): Likewise.
* gnat1drv.adb (Adjust_Global_Switches): Likewise.
* gnat_cuda.adb (Expand_CUDA_Package): Likewise.
* gnatchop.adb (Read_File): Likewise.
* gnatls.adb (Get_Runtime_Path): Likewise.
* make.adb (Binding_Phase): Likewise.
* par-ch11.adb (P_Exception_Choice): Likewise.
* par-ch5.adb (P_Loop_Parameter_Specification): Likewise.
* par-ch6.adb (Is_Extended): Likewise.
* sem_attr.adb (Check_Dereference): Likewise.
* sem_ch12.adb (Build_Subprogram_Decl_Wrapper): Likewise.
* sem_ch3.adb (Build_Itype_Reference): Likewise.
* sem_prag.adb (Validate_Compile_Time_Warning_Errors): Likewise.
* sem_res.adb (Resolve_Declare_Expression): Likewise.
* sem_util.adb (Build_Default_Subtype): Likewise.
* sprint.adb (Sprint_Paren_Comma_List): Likewise.

24 files changed:
gcc/ada/backend_utils.adb
gcc/ada/errout.adb
gcc/ada/erroutc.adb
gcc/ada/exp_aggr.adb
gcc/ada/exp_pakd.adb
gcc/ada/exp_prag.adb
gcc/ada/exp_strm.adb
gcc/ada/freeze.adb
gcc/ada/gen_il-gen.adb
gcc/ada/gnat1drv.adb
gcc/ada/gnat_cuda.adb
gcc/ada/gnatchop.adb
gcc/ada/gnatls.adb
gcc/ada/make.adb
gcc/ada/par-ch11.adb
gcc/ada/par-ch5.adb
gcc/ada/par-ch6.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sprint.adb

index 6f4b5878acb76f50390fb26d9f7e0644605dec77..3591cd19bbf0b895145d45e13fa7cf4f528bb8d8 100644 (file)
@@ -38,7 +38,6 @@ package body Backend_Utils is
       First : constant Positive := Switch_Chars'First + 1;
       Last  : constant Natural  := Switch_Last (Switch_Chars);
    begin
-
       --  Recognize -gxxx switches
 
       if Switch_Chars (First) = 'g' then
index 1d82386099ceda78b488432477d768f44213f83e..c6534fe2a76574a79db1ccf290713e21091b67f4 100644 (file)
@@ -2498,7 +2498,6 @@ package body Errout is
    --  Start of processing for Output_JSON_Message
 
    begin
-
       --  Print message kind
 
       Write_Str ("{""kind"":");
index aa9aac4774f40453cdc2345bf7aaf979eeae272b..7a823cefe568a5a20c47c3264f9fe5cad77bc82e 100644 (file)
@@ -1162,7 +1162,6 @@ package body Erroutc is
 
    procedure Set_Msg_Char (C : Character) is
    begin
-
       --  The check for message buffer overflow is needed to deal with cases
       --  where insertions get too long (in particular a child unit name can
       --  be very long).
index 2031d042fa50baf18f1cee3fc19513fcd6f2901e..59ed75e8d6957878bafc39d3a7c83791441cc0ca 100644 (file)
@@ -9636,7 +9636,6 @@ package body Exp_Aggr is
       --  One-dimensional subaggregate
 
    begin
-
       --  For now, only deal with cases where an integral number of elements
       --  fit in a single byte. This includes the most common boolean case.
 
index 00bf60ae40677858320f70d542cd010e3ffe969d..3674d31bbab8962935d39ab122824682e8cb42fc 100644 (file)
@@ -1511,7 +1511,6 @@ package body Exp_Pakd is
       Offset : Node_Id;
 
    begin
-
       if CodePeer_Mode then
          return;
       end if;
@@ -1555,7 +1554,6 @@ package body Exp_Pakd is
       Offset : Node_Id;
 
    begin
-
       if CodePeer_Mode then
          return;
       end if;
@@ -1595,7 +1593,6 @@ package body Exp_Pakd is
       PAT  : Entity_Id;
 
    begin
-
       if CodePeer_Mode then
          return;
       end if;
@@ -1763,7 +1760,6 @@ package body Exp_Pakd is
       Arg   : Node_Id;
 
    begin
-
       if CodePeer_Mode then
          return;
       end if;
@@ -1931,7 +1927,6 @@ package body Exp_Pakd is
       PAT  : Entity_Id;
 
    begin
-
       if CodePeer_Mode then
          return;
       end if;
@@ -2033,7 +2028,6 @@ package body Exp_Pakd is
       Size : Unat;
 
    begin
-
       if CodePeer_Mode then
          return;
       end if;
index a9379025a6bf09298b8a2b6fdce99c686757bb67..2c054d1b967085f85a4b358ad5f1347a2077f0dd 100644 (file)
@@ -955,7 +955,6 @@ package body Exp_Prag is
          Third_Component  : Entity_Id := Next_Entity (Second_Component);
 
       begin
-
          --  Sem_prag.adb ensured that Init_Val is either a Dim3, an aggregate
          --  of three Any_Integers or Any_Integer.
 
index 43deead525b09f4a0f000d169de6a7a5e3a062b2..75b9d3c845b9d1ef062a4909201dda6e4e7daf6d 100644 (file)
@@ -455,7 +455,6 @@ package body Exp_Strm is
       Lib_RE  : RE_Id;
 
    begin
-
       --  Check first for Boolean and Character. These are enumeration types,
       --  but we treat them specially, since they may require special handling
       --  in the transfer protocol. However, this special handling only applies
index 9c533722985462369435fcc69818f726b11f964e..cf7a22efcae14ba34fcdc9285b7b0b71c9462106 100644 (file)
@@ -3168,7 +3168,6 @@ package body Freeze is
               Find_Aspect (Typ, Aspect_No_Parts);
             Curr_Aspect_Spec : Entity_Id;
          begin
-
             --  Examine Typ's associated node, when present, since aspect
             --  specifications do not get transferred when nodes get rewritten.
 
@@ -3235,7 +3234,6 @@ package body Freeze is
             Aspect_Spec : constant Entity_Id :=
               Find_Aspect_No_Parts (Typ);
          begin
-
             --  Return the value of the aspect when present
 
             if Present (Aspect_Spec) then
index b4e10b91d3be47ffc0e2f67225a307a2d56036f2..7e58a2c60f2163bd336ceab94de00dc673055c40 100644 (file)
@@ -1022,7 +1022,6 @@ package body Gen_IL.Gen is
       --  Start of processing for Compute_Field_Offsets
 
       begin
-
          --  Compute the number of types that have each field, weighted by the
          --  frequency of such nodes.
 
index 6b6fbf3a1749203b3fa49932c0ed97e142054e44..b532aefcaaa904aefe70c4ea60c1daf489ce51d9 100644 (file)
@@ -145,7 +145,6 @@ procedure Gnat1drv is
    --  Start of processing for Adjust_Global_Switches
 
    begin
-
       --  -gnatd_U disables prepending error messages with "error:"
 
       if Debug_Flag_Underscore_UU then
index b531c15d3806ca4868113da9a1a18c902e0713e3..f601dd3ceb0b94c02d7b3ff25cd8d1d165906285 100644 (file)
@@ -191,7 +191,6 @@ package body GNAT_CUDA is
 
    procedure Expand_CUDA_Package (N : Node_Id) is
    begin
-
       --  If not compiling for the host, do not do anything.
 
       if not Debug_Flag_Underscore_C then
index 6bb91b1761521f957cd23040ff4b35ed6eeb5e23..3fbb751874e6040997f177aceb88c13f55e80b4d 100644 (file)
@@ -984,7 +984,6 @@ procedure Gnatchop is
       Read_Ptr    : File_Offset := 1;
 
    begin
-
       loop
          This_Read := Read (FD,
            A => Buffer (Read_Ptr)'Address,
index c52c1aea9c3f5bdc5a62811dd2120cbe4a468121..1e8dc858e29412809af8eaaf79cd0c4af7d6f410 100644 (file)
@@ -1573,7 +1573,6 @@ procedure Gnatls is
          Last  : Natural;
 
       begin
-
          if Is_Absolute_Path (Path) then
             if Is_Directory (Path) then
                return new String'(Path);
index cef243411358e1366743e0f9be269e737b590f06..19f209459864bdd953fb2d856d9d82a5bcd19d4e 100644 (file)
@@ -3022,7 +3022,6 @@ package body Make is
       --  when gnatbind is invoked with -shared.
 
    begin
-
       --  Check now for switch -shared
 
       for J in Binder_Switches.First .. Last_Arg loop
index d4eefe817dfdffd1a442cf598a787396924211ab..8b51fc7e5b320216d15311c95650c415fb408d02 100644 (file)
@@ -163,7 +163,6 @@ package body Ch11 is
 
    function P_Exception_Choice return Node_Id is
    begin
-
       if Token = Tok_Others then
          Scan; -- past OTHERS
          return New_Node (N_Others_Choice, Prev_Token_Ptr);
index 68c3025e3a03111b706018fc16f3e9b9a3b8293c..6de9ef0089e95d75992c0551ac573530c55b8b4b 100644 (file)
@@ -1745,7 +1745,6 @@ package body Ch5 is
       Scan_State : Saved_Scan_State;
 
    begin
-
       Save_Scan_State (Scan_State);
       ID_Node := P_Defining_Identifier (C_In);
 
index 830e6bec83e0da495e7f7c9602ef724a81bfcc1e..7fe4337353518d8cf5ef6e0782ff6b11db9b4efc 100644 (file)
@@ -1911,7 +1911,6 @@ package body Ch6 is
          Is_Extended : Boolean := False;
 
       begin
-
          if Token = Tok_Identifier then
             Save_Scan_State (Scan_State); -- at identifier
             Scan; -- past identifier
index d742e1075c0ca50ec5bfa7aa8391f5123533eb68..5720e5e935726d98114c74777f9e4a47fa1548f5 100644 (file)
@@ -2092,7 +2092,6 @@ package body Sem_Attr is
 
       procedure Check_Dereference is
       begin
-
          --  Case of a subtype mark
 
          if Is_Entity_Name (P) and then Is_Type (Entity (P)) then
index 8714efe14610c69e39ac02cad67f14467f5766b8..6b98343aeebea881d14d23b162998682764474df 100644 (file)
@@ -6296,7 +6296,6 @@ package body Sem_Ch12 is
       New_F     : Entity_Id;
 
    begin
-
       Subp := Make_Defining_Identifier (Loc, Chars (Formal_Subp));
       Mutate_Ekind (Subp, Ekind (Formal_Subp));
       Set_Is_Generic_Actual_Subprogram (Subp);
index 8787a904e9f65439a72c241d6819f354c9ead92a..ce3fe18080d7c310d732d00447cd46e43fd0d625 100644 (file)
@@ -10952,7 +10952,6 @@ package body Sem_Ch3 is
    is
       IR : constant Node_Id := Make_Itype_Reference (Sloc (Nod));
    begin
-
       --  Itype references are only created for use by the back-end
 
       if Inside_A_Generic then
index 784c9a49ae3cfc07112d4a4c170d322e267abaa3..52d63cf44922abcf4458b3f1a946650dff3ea48f 100644 (file)
@@ -33950,7 +33950,6 @@ package body Sem_Prag is
    --  Start of processing for Validate_Compile_Time_Warning_Errors
 
    begin
-
       --  These error/warning messages were deferred because they could not be
       --  evaluated in the front-end and they needed additional information
       --  from the back-end. There is no reason to run these checks again if
index 19e5226066185ae7f0e1a27e68bc5fd454c5d46c..8a18430ff5859b7beaeceb7bd84b2ec33da11cba 100644 (file)
@@ -7687,7 +7687,6 @@ package body Sem_Res is
    --  Start of processing for Resolve_Declare_Expression
 
    begin
-
       Decl := First (Actions (N));
 
       while Present (Decl) loop
index 19941ae3060f931880280d051e4695e0b8e25022..032684f3ddbae0750dca82f1927bfbd4ca2a7b81 100644 (file)
@@ -1784,7 +1784,6 @@ package body Sem_Util is
 
    function Build_Default_Subtype_OK (T : Entity_Id) return Boolean is
    begin
-
       if Is_Constrained (T) then
 
          --  We won't build a new subtype if T is constrained
index 3f73006ad6e0063279ac959958aac8984b305d9f..ea16591608bfa4ef36d625942634d5d6db332dd8 100644 (file)
@@ -3780,7 +3780,6 @@ package body Sprint is
       Node_Exists : Boolean := False;
 
    begin
-
       if Is_Non_Empty_List (List) then
 
          if Dump_Original_Only then
This page took 0.131601 seconds and 5 git commands to generate.