[Ada] Remove extra space in single object declarations

gcc/ada/

	* exp_aggr.adb, exp_attr.adb, exp_ch3.adb, exp_ch7.adb,
	exp_dist.adb, exp_util.adb, freeze.adb, frontend.adb,
	inline.adb, itypes.adb, lib-load.adb, lib-xref.adb,
	libgnat/a-cfhase.adb, libgnat/a-cforse.adb,
	libgnat/a-chtgbo.adb, libgnat/a-crdlli.adb,
	libgnat/a-except.adb, libgnat/a-strfix.adb,
	libgnat/a-textio.adb, libgnat/a-tienau.adb,
	libgnat/a-tigeau.adb, libgnat/a-witeio.adb,
	libgnat/a-wtenau.adb, libgnat/a-wtgeau.adb,
	libgnat/a-ztenau.adb, libgnat/a-ztexio.adb,
	libgnat/a-ztgeau.adb, libgnat/g-comlin.adb,
	libgnat/g-debpoo.adb, libgnat/g-expect.adb,
	libgnat/s-fileio.adb, libgnat/s-memory.adb, libgnat/s-mmap.adb,
	libgnat/s-objrea.adb, libgnat/s-pehage.adb,
	libgnat/s-regpat.adb, libgnat/s-shasto.adb,
	libgnat/s-valued.adb, libgnat/s-valuef.adb, par-ch11.adb,
	par-ch4.adb, par-ch6.adb, par-ch9.adb, par_sco.adb,
	repinfo-input.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb,
	sem_ch13.adb, sem_ch4.adb, sem_eval.adb, sem_prag.adb,
	sem_res.adb, sem_util.adb, sinput.adb, switch-c.adb: Fix style.
This commit is contained in:
Piotr Trojanek 2021-12-27 19:42:51 +01:00 committed by Pierre-Marie de Rodat
parent f9cdce4a71
commit fb8e35819d
56 changed files with 76 additions and 76 deletions

View File

@ -9375,7 +9375,7 @@ package body Exp_Aggr is
-----------------------
function Get_Component_Val (N : Node_Id) return Uint is
Val : Uint;
Val : Uint;
begin
-- We have to analyze the expression here before doing any further

View File

@ -3784,7 +3784,7 @@ package body Exp_Attr is
--------------
when Attribute_From_Any => From_Any : declare
Decls : constant List_Id := New_List;
Decls : constant List_Id := New_List;
begin
Rewrite (N,

View File

@ -4139,7 +4139,7 @@ package body Exp_Ch3 is
Set_Static_Initialization (Proc_Id, Agg);
declare
Comp : Node_Id;
Comp : Node_Id;
begin
Comp := First (Component_Associations (Agg));
while Present (Comp) loop

View File

@ -4702,7 +4702,7 @@ package body Exp_Ch7 is
(N : Node_Id;
Ref : Node_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (N);
Loc : constant Source_Ptr := Sloc (N);
begin
-- For restricted run-time libraries (Ravenscar), tasks are

View File

@ -2908,7 +2908,7 @@ package body Exp_Dist is
---------------------------------
procedure Expand_Calling_Stubs_Bodies (Unit_Node : Node_Id) is
Spec : constant Node_Id := Specification (Unit_Node);
Spec : constant Node_Id := Specification (Unit_Node);
begin
Add_Calling_Stubs_To_Declarations (Spec);
end Expand_Calling_Stubs_Bodies;

View File

@ -8780,7 +8780,7 @@ package body Exp_Util is
----------------------------------
function Is_Possibly_Unaligned_Object (N : Node_Id) return Boolean is
T : constant Entity_Id := Etype (N);
T : constant Entity_Id := Etype (N);
begin
-- If renamed object, apply test to underlying object

View File

@ -2124,7 +2124,7 @@ package body Freeze is
----------------------------
procedure Check_Strict_Alignment (E : Entity_Id) is
Comp : Entity_Id;
Comp : Entity_Id;
begin
-- Bit-packed array types do not require strict alignment, even if they

View File

@ -539,7 +539,7 @@ begin
-- Initialize_Scalars, but others should be checked: as well???
declare
Item : Node_Id;
Item : Node_Id;
begin
Item := First (Context_Items (Cunit (Main_Unit)));

View File

@ -2377,7 +2377,7 @@ package body Inline is
------------------------
function Copy_Return_Object (Obj_Decl : Node_Id) return Node_Id is
Obj_Id : constant Entity_Id := Defining_Entity (Obj_Decl);
Obj_Id : constant Entity_Id := Defining_Entity (Obj_Decl);
begin
-- The use of New_Copy_Tree ensures that global references are
@ -3264,7 +3264,7 @@ package body Inline is
------------------
function Process_Loop (N : Node_Id) return Traverse_Result is
Id : Entity_Id;
Id : Entity_Id;
begin
if Nkind (N) = N_Loop_Statement
@ -3676,7 +3676,7 @@ package body Inline is
----------------------------
procedure Rewrite_Procedure_Call (N : Node_Id; Blk : Node_Id) is
HSS : constant Node_Id := Handled_Statement_Sequence (Blk);
HSS : constant Node_Id := Handled_Statement_Sequence (Blk);
begin
Make_Loop_Labels_Unique (HSS);

View File

@ -89,7 +89,7 @@ package body Itypes is
Related_Nod : Node_Id;
Scope_Id : Entity_Id := Current_Scope) return Entity_Id
is
I_Typ : Entity_Id;
I_Typ : Entity_Id;
begin
pragma Assert (Is_Access_Type (T));

View File

@ -958,7 +958,7 @@ package body Lib.Load is
-- code will have to be generated for it.
procedure Make_Instance_Unit (N : Node_Id; In_Main : Boolean) is
Sind : constant Source_File_Index := Source_Index (Main_Unit);
Sind : constant Source_File_Index := Source_Index (Main_Unit);
begin
Units.Increment_Last;

View File

@ -1677,7 +1677,7 @@ package body Lib.Xref is
-- declared in the main unit.
Handle_Prim_Ops : declare
Ent : Entity_Id;
Ent : Entity_Id;
begin
for J in 1 .. Xrefs.Last loop

View File

@ -949,7 +949,7 @@ is
(Vet (Container, Position), "bad cursor in function Key");
declare
N : Node_Type renames Container.Content.Nodes (Position.Node);
N : Node_Type renames Container.Content.Nodes (Position.Node);
begin
return Key (N.Element);
end;

View File

@ -429,7 +429,7 @@ is
------------------
procedure Delete_First (Container : in out Set) is
X : constant Count_Type := Container.Content.First;
X : constant Count_Type := Container.Content.First;
begin
if X /= 0 then
Tree_Operations.Delete_Node_Sans_Free (Container.Content, X);
@ -442,7 +442,7 @@ is
-----------------
procedure Delete_Last (Container : in out Set) is
X : constant Count_Type := Container.Content.Last;
X : constant Count_Type := Container.Content.Last;
begin
if X /= 0 then
Tree_Operations.Delete_Node_Sans_Free (Container.Content, X);
@ -1741,7 +1741,7 @@ is
--------------
function New_Node return Count_Type is
N : Node_Type renames NN (Node);
N : Node_Type renames NN (Node);
begin
N.Element := Item;
N.Color := Red;

View File

@ -439,7 +439,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is
(Stream : not null access Root_Stream_Type'Class;
HT : out Hash_Table_Type'Class)
is
N : Count_Type'Base;
N : Count_Type'Base;
begin
Clear (HT);

View File

@ -1316,7 +1316,7 @@ package body Ada.Containers.Restricted_Doubly_Linked_Lists is
pragma Assert (Vet (Position), "bad cursor in Update_Element");
declare
N : Node_Type renames Container.Nodes (Position.Node);
N : Node_Type renames Container.Nodes (Position.Node);
begin
Process (N.Element);

View File

@ -1110,7 +1110,7 @@ package body Ada.Exceptions is
else
declare
New_Msg : constant String := Prefix & Exception_Name (X);
New_Msg : constant String := Prefix & Exception_Name (X);
begin
-- No message present, just provide our own

View File

@ -370,7 +370,7 @@ package body Ada.Strings.Fixed with SPARK_Mode is
Before : Positive;
New_Item : String) return String
is
Front : constant Integer := Before - Source'First;
Front : constant Integer := Before - Source'First;
begin
if Before - 1 not in Source'First - 1 .. Source'Last then

View File

@ -403,7 +403,7 @@ is
-----------------
function End_Of_Page (File : File_Type) return Boolean is
ch : int;
ch : int;
begin
FIO.Check_Read_Status (AP (File));
@ -598,7 +598,7 @@ is
(File : File_Type;
Item : out Character)
is
ch : int;
ch : int;
begin
FIO.Check_Read_Status (AP (File));

View File

@ -213,7 +213,7 @@ package body Ada.Text_IO.Enumeration_Aux is
Start : out Natural;
Stop : out Natural)
is
C : Character;
C : Character;
-- Processing for Scan_Enum_Lit

View File

@ -384,7 +384,7 @@ package body Ada.Text_IO.Generic_Aux is
Buf : out String;
Ptr : in out Natural)
is
Loaded : Boolean;
Loaded : Boolean;
begin
-- Skip initial blanks, and load possible sign

View File

@ -274,7 +274,7 @@ package body Ada.Wide_Text_IO is
-----------------
function End_Of_File (File : File_Type) return Boolean is
ch : int;
ch : int;
begin
FIO.Check_Read_Status (AP (File));
@ -368,7 +368,7 @@ package body Ada.Wide_Text_IO is
-----------------
function End_Of_Page (File : File_Type) return Boolean is
ch : int;
ch : int;
begin
FIO.Check_Read_Status (AP (File));
@ -444,7 +444,7 @@ package body Ada.Wide_Text_IO is
(File : File_Type;
Item : out Wide_Character)
is
C : Character;
C : Character;
begin
FIO.Check_Read_Status (AP (File));

View File

@ -227,7 +227,7 @@ package body Ada.Wide_Text_IO.Enumeration_Aux is
Start : out Natural;
Stop : out Natural)
is
WC : Wide_Character;
WC : Wide_Character;
-- Processing for Scan_Enum_Lit

View File

@ -410,7 +410,7 @@ package body Ada.Wide_Text_IO.Generic_Aux is
Buf : out String;
Ptr : in out Natural)
is
Loaded : Boolean;
Loaded : Boolean;
begin
-- Skip initial blanks and load possible sign

View File

@ -229,7 +229,7 @@ package body Ada.Wide_Wide_Text_IO.Enumeration_Aux is
Start : out Natural;
Stop : out Natural)
is
WC : Wide_Wide_Character;
WC : Wide_Wide_Character;
-- Processing for Scan_Enum_Lit

View File

@ -274,7 +274,7 @@ package body Ada.Wide_Wide_Text_IO is
-----------------
function End_Of_File (File : File_Type) return Boolean is
ch : int;
ch : int;
begin
FIO.Check_Read_Status (AP (File));
@ -368,7 +368,7 @@ package body Ada.Wide_Wide_Text_IO is
-----------------
function End_Of_Page (File : File_Type) return Boolean is
ch : int;
ch : int;
begin
FIO.Check_Read_Status (AP (File));
@ -444,7 +444,7 @@ package body Ada.Wide_Wide_Text_IO is
(File : File_Type;
Item : out Wide_Wide_Character)
is
C : Character;
C : Character;
begin
FIO.Check_Read_Status (AP (File));

View File

@ -410,7 +410,7 @@ package body Ada.Wide_Wide_Text_IO.Generic_Aux is
Buf : out String;
Ptr : in out Natural)
is
Loaded : Boolean;
Loaded : Boolean;
begin
-- Skip initial blanks and load possible sign

View File

@ -465,8 +465,8 @@ package body GNAT.Command_Line is
if Do_Expansion then
declare
Arg : constant String :=
Argument (Parser, Parser.Current_Argument - 1);
Arg : constant String :=
Argument (Parser, Parser.Current_Argument - 1);
begin
for Index in Arg'Range loop
if Arg (Index) in '*' | '?' | '[' then
@ -1257,7 +1257,7 @@ package body GNAT.Command_Line is
Expanded : String;
Section : String := "")
is
Def : Alias_Definition;
Def : Alias_Definition;
begin
if Config = null then

View File

@ -777,7 +777,7 @@ package body GNAT.Debug_Pools is
function Is_Valid_Or_Handled
(Storage : System.Address;
Valid : Boolean) return Boolean is
Int_Storage : constant Integer_Address := To_Integer (Storage);
Int_Storage : constant Integer_Address := To_Integer (Storage);
begin
-- The pool only returns addresses aligned on Storage_Alignment so

View File

@ -193,7 +193,7 @@ package body GNAT.Expect is
Str : String;
Filter_On : Filter_Type)
is
Current_Filter : Filter_List;
Current_Filter : Filter_List;
begin
if Pid.Filters_Lock = 0 then

View File

@ -244,7 +244,7 @@ package body System.File_IO is
if File.Shared_Status = Yes then
declare
P : AFCB_Ptr;
P : AFCB_Ptr;
begin
P := Open_Files;

View File

@ -134,7 +134,7 @@ package body System.Memory is
Size : size_t)
return System.Address
is
Result : System.Address;
Result : System.Address;
begin
if Size = size_t'Last then
raise Storage_Error with "object too large";

View File

@ -367,7 +367,7 @@ package body System.Mmap is
Length : File_Size := 0;
Mutable : Boolean := False) return Mapped_Region
is
Region : Mapped_Region := Invalid_Mapped_Region;
Region : Mapped_Region := Invalid_Mapped_Region;
begin
Read (File, Region, Offset, Length, Mutable);
return Region;

View File

@ -1472,7 +1472,7 @@ package body System.Object_Reader is
(Obj : in out XCOFF32_Object_File;
Sym : Object_Symbol) return String_Ptr_Len
is
Symbol : Symbol_Entry;
Symbol : Symbol_Entry;
begin
Seek (Obj.Symtab_Stream, Sym.Off);
@ -1820,7 +1820,7 @@ package body System.Object_Reader is
(S : in out Mapped_Stream;
Off : Offset) return String
is
Buf : Buffer;
Buf : Buffer;
begin
Seek (S, Off);

View File

@ -1233,7 +1233,7 @@ package body System.Perfect_Hash_Generators is
------------
procedure Insert (Value : String) is
Len : constant Natural := Value'Length;
Len : constant Natural := Value'Length;
begin
if Verbose then

View File

@ -664,7 +664,7 @@ package body System.Regpat is
Operand : Pointer;
Greedy : Boolean := True)
is
Old : Pointer;
Old : Pointer;
begin
Old := Insert_Operator_Before (Op, Operand, Greedy, Opsize => 7);
Emit_Natural (Old + Next_Pointer_Bytes, Min);
@ -2108,7 +2108,7 @@ package body System.Regpat is
if Do_Print then
declare
Point : constant String := Pointer'Image (Index);
Point : constant String := Pointer'Image (Index);
begin
Put ([1 .. 4 - Point'Length => ' ']
& Point & ":"

View File

@ -440,7 +440,7 @@ package body System.Shared_Storage is
if SFE = null then
declare
S : aliased constant String := Dir.all & Var;
S : aliased constant String := Dir.all & Var;
begin
SFE := new Shared_Var_File_Entry;
@ -521,7 +521,7 @@ package body System.Shared_Storage is
if SFE = null then
declare
S : aliased constant String := Dir.all & Var;
S : aliased constant String := Dir.all & Var;
begin
SFE := new Shared_Var_File_Entry;

View File

@ -186,7 +186,7 @@ package body System.Value_D is
elsif S > 0 then
declare
LS : Integer := S;
LS : Integer := S;
begin
Y := Safe_Expont (B, LS, 10 ** Integer'Max (0, Scale));

View File

@ -255,7 +255,7 @@ package body System.Value_F is
elsif ScaleB > 0 then
declare
LS : Integer := ScaleB;
LS : Integer := ScaleB;
begin
Y := Safe_Expont (B, LS, Den);

View File

@ -56,7 +56,7 @@ package body Ch11 is
-- Error_Recovery : Cannot raise Error_Resync
function P_Handled_Sequence_Of_Statements return Node_Id is
Handled_Stmt_Seq_Node : Node_Id;
Handled_Stmt_Seq_Node : Node_Id;
begin
Handled_Stmt_Seq_Node :=
New_Node (N_Handled_Sequence_Of_Statements, Token_Ptr);

View File

@ -1194,7 +1194,7 @@ package body Ch4 is
(Prefix_Node : Node_Id)
return Node_Id
is
Attr_Node : Node_Id;
Attr_Node : Node_Id;
begin
Attr_Node := New_Node (N_Attribute_Reference, Token_Ptr);

View File

@ -1144,7 +1144,7 @@ package body Ch6 is
--------------
function Real_Dot return Boolean is
Scan_State : Saved_Scan_State;
Scan_State : Saved_Scan_State;
begin
if Token /= Tok_Dot then

View File

@ -283,7 +283,7 @@ package body Ch9 is
-- Error recovery: cannot raise Error_Resync
function P_Task_Definition return Node_Id is
Def_Node : Node_Id;
Def_Node : Node_Id;
begin
Def_Node := New_Node (N_Task_Definition, Token_Ptr);

View File

@ -922,8 +922,8 @@ package body Par_SCO is
---------------------
procedure Record_Instance (Id : Instance_Id; Inst_Sloc : Source_Ptr) is
Inst_Src : constant Source_File_Index :=
Get_Source_File_Index (Inst_Sloc);
Inst_Src : constant Source_File_Index :=
Get_Source_File_Index (Inst_Sloc);
begin
SCO_Instance_Table.Append
((Inst_Dep_Num => Dependency_Num (Unit (Inst_Src)),

View File

@ -288,7 +288,7 @@ package body Repinfo.Input is
----------------------
function Decode_Integer (Lo, Hi : Text_Ptr) return Uint is
Len : constant Nat := Int (Hi) - Int (Lo) + 1;
Len : constant Nat := Int (Hi) - Int (Lo) + 1;
begin
-- Decode up to 9 characters manually, otherwise call into Uint

View File

@ -526,8 +526,8 @@ package body Sem_Cat is
----------------------------
function In_Package_Declaration return Boolean is
Unit_Kind : constant Node_Kind :=
Nkind (Unit (Cunit (Current_Sem_Unit)));
Unit_Kind : constant Node_Kind :=
Nkind (Unit (Cunit (Current_Sem_Unit)));
begin
-- There are no restrictions on the body of an RCI or RT unit

View File

@ -2279,7 +2279,7 @@ package body Sem_Ch10 is
----------------------------
procedure Re_Install_Use_Clauses is
U : Node_Id;
U : Node_Id;
begin
for J in reverse 1 .. Num_Scopes loop
U := Use_Clauses (J);

View File

@ -2394,7 +2394,7 @@ package body Sem_Ch12 is
T : Entity_Id;
Def : Node_Id)
is
Loc : constant Source_Ptr := Sloc (Def);
Loc : constant Source_Ptr := Sloc (Def);
begin
-- Rewrite as a type declaration of a derived type. This ensures that
@ -10348,7 +10348,7 @@ package body Sem_Ch12 is
Formal_Ent : Entity_Id;
Actual_Ent : Entity_Id)
is
Act_Pkg : Entity_Id;
Act_Pkg : Entity_Id;
begin
Set_Instance_Of (Formal_Ent, Actual_Ent);

View File

@ -593,7 +593,7 @@ package body Sem_Ch13 is
Comp := First_Component_Or_Discriminant (R);
while Present (Comp) loop
declare
CC : constant Node_Id := Component_Clause (Comp);
CC : constant Node_Id := Component_Clause (Comp);
begin
-- Collect only component clauses whose last bit is less than

View File

@ -8263,7 +8263,7 @@ package body Sem_Ch4 is
and then Is_Entity_Name (Name (Parent (Par)))
then
declare
Proc : Entity_Id;
Proc : Entity_Id;
begin
-- We should look for an interpretation with the proper

View File

@ -4727,7 +4727,7 @@ package body Sem_Eval is
------------------
function Expr_Value_E (N : Node_Id) return Entity_Id is
Ent : constant Entity_Id := Entity (N);
Ent : constant Entity_Id := Entity (N);
begin
if Ekind (Ent) = E_Enumeration_Literal then
return Ent;

View File

@ -32677,7 +32677,7 @@ package body Sem_Prag is
--------------------------------------------
procedure Defer_Compile_Time_Warning_Error_To_BE (N : Node_Id) is
Arg1 : constant Node_Id := First (Pragma_Argument_Associations (N));
Arg1 : constant Node_Id := First (Pragma_Argument_Associations (N));
begin
Compile_Time_Warnings_Errors.Append
(New_Val => CTWE_Entry'(Eloc => Sloc (Arg1),

View File

@ -9774,7 +9774,7 @@ package body Sem_Res is
----------------------------
procedure Resolve_Set_Membership is
Alt : Node_Id;
Alt : Node_Id;
begin
-- If the left operand is overloaded, find type compatible with not

View File

@ -1659,7 +1659,7 @@ package body Sem_Util is
Typ : Entity_Id;
Suggest_Static : Boolean := False)
is
Gen : Entity_Id;
Gen : Entity_Id;
begin
-- Avoid cascaded errors
@ -10729,7 +10729,7 @@ package body Sem_Util is
-------------------------------------
function Get_Actual_Subtype_If_Available (N : Node_Id) return Entity_Id is
Typ : constant Entity_Id := Etype (N);
Typ : constant Entity_Id := Etype (N);
begin
-- If what we have is an identifier that references a subprogram
@ -21951,7 +21951,7 @@ package body Sem_Util is
------------------------------------
function Prefix_Has_Volatile_Components (P : Node_Id) return Boolean is
Typ : constant Entity_Id := Etype (P);
Typ : constant Entity_Id := Etype (P);
begin
if Is_Access_Type (Typ) then

View File

@ -329,7 +329,7 @@ package body Sinput is
begin
for X in 1 .. Source_File.Last loop
declare
S : Source_File_Record renames Source_File.Table (X);
S : Source_File_Record renames Source_File.Table (X);
begin
if S.Instance = No_Instance_Id then
Free_Source_Buffer (S.Source_Text);

View File

@ -1285,7 +1285,7 @@ package body Switch.C is
else
declare
OK : Boolean;
OK : Boolean;
begin
Set_Validity_Check_Options
@ -1408,7 +1408,7 @@ package body Switch.C is
Store_Switch := False;
declare
OK : Boolean;
OK : Boolean;
begin
Set_Style_Check_Options