[Ada] Fix inconstent subprogram body headers

These are GNAT style violations detected with a trivial Libadalang checker.

2018-05-21  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* ada_get_targ.adb: Fix subprogram body headers.
	* adabkend.adb: Likewise.
	* checks.adb: Likewise.
	* exp_ch3.adb: Likewise.
	* exp_ch5.adb: Likewise.
	* exp_ch9.adb: Likewise.
	* exp_dist.adb: Likewise.
	* exp_tss.adb: Likewise.
	* inline.adb: Likewise.
	* lib-writ.adb: Likewise.
	* lib-xref-spark_specific.adb: Likewise.
	* libgnarl/s-osinte__darwin.adb: Likewise.
	* libgnarl/s-stusta.adb: Likewise.
	* libgnarl/s-taprop__solaris.adb: Likewise.
	* libgnarl/s-tposen.adb: Likewise.
	* libgnarl/s-vxwext__kernel-smp.adb: Likewise.
	* libgnarl/s-vxwext__kernel.adb: Likewise.
	* libgnat/a-btgbso.adb: Likewise.
	* libgnat/a-cfdlli.adb: Likewise.
	* libgnat/a-cfhama.adb: Likewise.
	* libgnat/a-cfinve.adb: Likewise.
	* libgnat/a-cimutr.adb: Likewise.
	* libgnat/a-coboho.adb: Likewise.
	* libgnat/a-cofove.adb: Likewise.
	* libgnat/a-cofuve.adb: Likewise.
	* libgnat/a-comutr.adb: Likewise.
	* libgnat/a-exexda.adb: Likewise.
	* libgnat/a-tags.adb: Likewise.
	* libgnat/a-tideau.adb: Likewise.
	* libgnat/a-wtdeau.adb: Likewise.
	* libgnat/a-ztdeau.adb: Likewise.
	* libgnat/g-alleve.adb: Likewise.
	* libgnat/s-excdeb.adb: Likewise.
	* libgnat/s-parint.adb: Likewise.
	* libgnat/s-shasto.adb: Likewise.
	* libgnat/s-traceb__hpux.adb: Likewise.
	* prepcomp.adb: Likewise.
	* sem_ch4.adb: Likewise.
	* sem_ch6.adb: Likewise.
	* sem_dist.adb: Likewise.
	* sem_prag.adb: Likewise.
	* sem_util.adb: Likewise.
	* sinfo.adb: Likewise.
	* switch.adb: Likewise.

From-SVN: r260442
This commit is contained in:
Piotr Trojanek 2018-05-21 14:49:46 +00:00 committed by Pierre-Marie de Rodat
parent 8a49324e8a
commit 8016e5676b
45 changed files with 185 additions and 138 deletions

View File

@ -1,3 +1,50 @@
2018-04-04 Piotr Trojanek <trojanek@adacore.com>
* ada_get_targ.adb: Fix subprogram body headers.
* adabkend.adb: Likewise.
* checks.adb: Likewise.
* exp_ch3.adb: Likewise.
* exp_ch5.adb: Likewise.
* exp_ch9.adb: Likewise.
* exp_dist.adb: Likewise.
* exp_tss.adb: Likewise.
* inline.adb: Likewise.
* lib-writ.adb: Likewise.
* lib-xref-spark_specific.adb: Likewise.
* libgnarl/s-osinte__darwin.adb: Likewise.
* libgnarl/s-stusta.adb: Likewise.
* libgnarl/s-taprop__solaris.adb: Likewise.
* libgnarl/s-tposen.adb: Likewise.
* libgnarl/s-vxwext__kernel-smp.adb: Likewise.
* libgnarl/s-vxwext__kernel.adb: Likewise.
* libgnat/a-btgbso.adb: Likewise.
* libgnat/a-cfdlli.adb: Likewise.
* libgnat/a-cfhama.adb: Likewise.
* libgnat/a-cfinve.adb: Likewise.
* libgnat/a-cimutr.adb: Likewise.
* libgnat/a-coboho.adb: Likewise.
* libgnat/a-cofove.adb: Likewise.
* libgnat/a-cofuve.adb: Likewise.
* libgnat/a-comutr.adb: Likewise.
* libgnat/a-exexda.adb: Likewise.
* libgnat/a-tags.adb: Likewise.
* libgnat/a-tideau.adb: Likewise.
* libgnat/a-wtdeau.adb: Likewise.
* libgnat/a-ztdeau.adb: Likewise.
* libgnat/g-alleve.adb: Likewise.
* libgnat/s-excdeb.adb: Likewise.
* libgnat/s-parint.adb: Likewise.
* libgnat/s-shasto.adb: Likewise.
* libgnat/s-traceb__hpux.adb: Likewise.
* prepcomp.adb: Likewise.
* sem_ch4.adb: Likewise.
* sem_ch6.adb: Likewise.
* sem_dist.adb: Likewise.
* sem_prag.adb: Likewise.
* sem_util.adb: Likewise.
* sinfo.adb: Likewise.
* switch.adb: Likewise.
2018-05-04 John Marino <gnugcc@marino.st>
PR ada/85635

View File

@ -55,9 +55,9 @@ package body Get_Targ is
return 8;
end Get_Char_Size;
-----------------
-- Get_Wchar_T --
-----------------
----------------------
-- Get_Wchar_T_Size --
----------------------
function Get_Wchar_T_Size return Pos is
begin

View File

@ -67,9 +67,9 @@ package body Adabkend is
Driver (Lib.Cunit (Types.Main_Unit));
end Call_Back_End;
------------------------
-- Scan_Compiler_Args --
------------------------
-----------------------------
-- Scan_Compiler_Arguments --
-----------------------------
procedure Scan_Compiler_Arguments is
Output_File_Name_Seen : Boolean := False;

View File

@ -3747,9 +3747,9 @@ package body Checks is
function Aggregate_Discriminant_Val (Disc : Entity_Id) return Node_Id;
----------------------------------
-- Aggregate_Discriminant_Value --
----------------------------------
--------------------------------
-- Aggregate_Discriminant_Val --
--------------------------------
function Aggregate_Discriminant_Val (Disc : Entity_Id) return Node_Id is
Assoc : Node_Id;

View File

@ -8775,9 +8775,9 @@ package body Exp_Ch3 is
end loop;
end Init_Secondary_Tags;
------------------------
-- Is_User_Defined_Eq --
------------------------
------------------------------
-- Is_User_Defined_Equality --
------------------------------
function Is_User_Defined_Equality (Prim : Node_Id) return Boolean is
begin

View File

@ -164,7 +164,7 @@ package body Exp_Ch5 is
-- is the original Assignment node.
--------------------------------------
-- Build_Formal_Container_iteration --
-- Build_Formal_Container_Iteration --
--------------------------------------
procedure Build_Formal_Container_Iteration

View File

@ -13300,9 +13300,9 @@ package body Exp_Ch9 is
Insert_Node := Decl;
end Add;
--------------------------
-- Replace_Discriminant --
--------------------------
-------------------
-- Replace_Bound --
-------------------
function Replace_Bound (Bound : Node_Id) return Node_Id is
begin

View File

@ -933,9 +933,9 @@ package body Exp_Dist is
procedure Visit_Nested_Pkg (Nested_Pkg_Decl : Node_Id);
-- Recurse for the given nested package declaration
-----------------------
-- Visit_Nested_Spec --
-----------------------
----------------------
-- Visit_Nested_Pkg --
----------------------
procedure Visit_Nested_Pkg (Nested_Pkg_Decl : Node_Id) is
Nested_Pkg_Spec : constant Node_Id := Specification (Nested_Pkg_Decl);
@ -9219,9 +9219,9 @@ package body Exp_Dist is
Idx));
end Build_Get_Aggregate_Element;
-------------------------
-- Build_Reposiroty_Id --
-------------------------
----------------------------------
-- Build_Name_And_Repository_Id --
----------------------------------
procedure Build_Name_And_Repository_Id
(E : Entity_Id;

View File

@ -173,9 +173,9 @@ package body Exp_Tss is
return Proc;
end Find_Inherited_TSS;
-----------------------
-- Get_TSS_Name_Type --
-----------------------
------------------
-- Get_TSS_Name --
------------------
function Get_TSS_Name (E : Entity_Id) return TSS_Name_Type is
C1 : Character;

View File

@ -1669,9 +1669,9 @@ package body Inline is
-- rewritten (the analysis of the non-inlined body will handle these
-- pragmas). A new internal name is associated with Body_To_Inline.
-----------------------------
-- Generate_Body_To_Inline --
-----------------------------
------------------------------
-- Generate_Subprogram_Body --
------------------------------
procedure Generate_Subprogram_Body
(N : Node_Id;

View File

@ -844,9 +844,9 @@ package body Lib.Writ is
-- Write source file name Nam and ALI file name for unit index Idx.
-- Possibly change Nam to lowercase (generating a new file name).
--------------------------
-- Write_With_File_Name --
--------------------------
---------------------------
-- Write_With_File_Names --
---------------------------
procedure Write_With_File_Names
(Nam : in out File_Name_Type;

View File

@ -168,9 +168,9 @@ package body SPARK_Specific is
end loop;
end Iterate_SPARK_Xrefs;
-------------------------------------
-- Enclosing_Subprogram_Or_Package --
-------------------------------------
---------------------------------------------
-- Enclosing_Subprogram_Or_Library_Package --
---------------------------------------------
function Enclosing_Subprogram_Or_Library_Package
(N : Node_Id) return Entity_Id

View File

@ -180,9 +180,9 @@ package body System.OS_Interface is
null;
end pthread_init;
----------------
-- Stack_Base --
----------------
--------------------
-- Get_Stack_Base --
--------------------
function Get_Stack_Base (thread : pthread_t) return Address is
pragma Unreferenced (thread);

View File

@ -158,9 +158,9 @@ package body System.Stack_Usage.Tasking is
end Report_Impl;
---------------------
-- Report_All_Task --
---------------------
----------------------
-- Report_All_Tasks --
----------------------
procedure Report_All_Tasks is
begin

View File

@ -1623,9 +1623,9 @@ package body System.Task_Primitives.Operations is
return True;
end Check_Unlock;
--------------------
-- Check_Finalize --
--------------------
-------------------------
-- Check_Finalize_Lock --
-------------------------
function Check_Finalize_Lock (L : Lock_Ptr) return Boolean is
Self_ID : constant Task_Id := Self;

View File

@ -319,9 +319,9 @@ package body System.Tasking.Protected_Objects.Single_Entry is
Send_Program_Error (Entry_Call);
end PO_Do_Or_Queue;
----------------------------
-- Protected_Single_Count --
----------------------------
---------------------------
-- Protected_Count_Entry --
---------------------------
function Protected_Count_Entry (Object : Protection_Entry) return Natural is
begin

View File

@ -88,9 +88,9 @@ package body System.VxWorks.Ext is
return Set_Affinity (tid, CPU_Set);
end taskMaskAffinitySet;
--------------
-- taskCont --
--------------
---------------
-- Task_Cont --
---------------
function Task_Cont (tid : t_id) return int is
function taskCont (tid : t_id) return int;
@ -99,9 +99,9 @@ package body System.VxWorks.Ext is
return taskCont (tid);
end Task_Cont;
--------------
-- taskStop --
--------------
---------------
-- Task_Stop --
---------------
function Task_Stop (tid : t_id) return int is
function taskStop (tid : t_id) return int;

View File

@ -85,9 +85,9 @@ package body System.VxWorks.Ext is
return ERROR;
end taskMaskAffinitySet;
--------------
-- taskCont --
--------------
---------------
-- Task_Cont --
---------------
function Task_Cont (tid : t_id) return int is
function taskCont (tid : t_id) return int;
@ -96,9 +96,9 @@ package body System.VxWorks.Ext is
return taskCont (tid);
end Task_Cont;
--------------
-- taskStop --
--------------
---------------
-- Task_Stop --
---------------
function Task_Stop (tid : t_id) return int is
function taskStop (tid : t_id) return int;

View File

@ -52,9 +52,9 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
end return;
end Copy;
----------------
-- Difference --
----------------
--------------------
-- Set_Difference --
--------------------
procedure Set_Difference (Target : in out Set_Type; Source : Set_Type) is
Tgt, Src : Count_Type;
@ -197,9 +197,9 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
end return;
end Set_Difference;
------------------
-- Intersection --
------------------
----------------------
-- Set_Intersection --
----------------------
procedure Set_Intersection
(Target : in out Set_Type;
@ -328,9 +328,9 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
end return;
end Set_Intersection;
---------------
-- Is_Subset --
---------------
----------------
-- Set_Subset --
----------------
function Set_Subset
(Subset : Set_Type;
@ -384,9 +384,9 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
end;
end Set_Subset;
-------------
-- Overlap --
-------------
-----------------
-- Set_Overlap --
-----------------
function Set_Overlap (Left, Right : Set_Type) return Boolean is
begin
@ -424,9 +424,9 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
end;
end Set_Overlap;
--------------------------
-- Symmetric_Difference --
--------------------------
------------------------------
-- Set_Symmetric_Difference --
------------------------------
procedure Set_Symmetric_Difference
(Target : in out Set_Type;
@ -600,9 +600,9 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
end return;
end Set_Symmetric_Difference;
-----------
-- Union --
-----------
---------------
-- Set_Union --
---------------
procedure Set_Union (Target : in out Set_Type; Source : Set_Type) is
Hint : Count_Type := 0;

View File

@ -565,7 +565,7 @@ is
end M_Elements_Reversed;
------------------------
-- M_Elements_Swapted --
-- M_Elements_Swapped --
------------------------
function M_Elements_Swapped

View File

@ -429,7 +429,7 @@ is
procedure Lift_Abstraction_Level (Container : Map) is null;
-----------------------
-- Mapping_preserved --
-- Mapping_Preserved --
-----------------------
function Mapping_Preserved

View File

@ -426,9 +426,9 @@ is
end;
end Element;
--------------
-- Elements --
--------------
-----------
-- Elems --
-----------
function Elems (Container : in out Vector) return Maximal_Array_Ptr is
begin
@ -590,7 +590,7 @@ is
end M_Elements_Reversed;
------------------------
-- M_Elements_Swapted --
-- M_Elements_Swapped --
------------------------
function M_Elements_Swapped

View File

@ -1722,7 +1722,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
end Parent;
-------------------
-- Prepent_Child --
-- Prepend_Child --
-------------------
procedure Prepend_Child

View File

@ -64,9 +64,9 @@ package body Ada.Containers.Bounded_Holders is
return Get (Left) = Get (Right);
end "=";
-------------
-- Element --
-------------
---------
-- Get --
---------
function Get (Container : Holder) return Element_Type is
begin

View File

@ -422,9 +422,9 @@ is
end;
end Element;
--------------
-- Elements --
--------------
-----------
-- Elems --
-----------
function Elems (Container : in out Vector) return Maximal_Array_Ptr is
begin
@ -585,7 +585,7 @@ is
end M_Elements_Reversed;
------------------------
-- M_Elements_Swapted --
-- M_Elements_Swapped --
------------------------
function M_Elements_Swapped

View File

@ -119,7 +119,7 @@ package body Ada.Containers.Functional_Vectors with SPARK_Mode => Off is
end Contains;
------------------
-- Range_Except --
-- Equal_Except --
------------------
function Equal_Except

View File

@ -1725,7 +1725,7 @@ package body Ada.Containers.Multiway_Trees is
end Parent;
-------------------
-- Prepent_Child --
-- Prepend_Child --
-------------------
procedure Prepend_Child

View File

@ -489,9 +489,9 @@ package body Exception_Data is
Append_Info_NL (Info, Ptr);
end Append_Info_Untailored_Exception_Traceback;
-------------------------------------------
-- Basic_Exception_Information_Maxlength --
-------------------------------------------
------------------------------------
-- Basic_Exception_Info_Maxlength --
------------------------------------
function Basic_Exception_Info_Maxlength
(X : Exception_Occurrence) return Natural

View File

@ -1028,9 +1028,9 @@ package body Ada.Tags is
SSD (T).SSD_Table (Position).Index := Value;
end Set_Entry_Index;
-----------------------
-- Set_Offset_To_Top --
-----------------------
-------------------------------
-- Set_Dynamic_Offset_To_Top --
-------------------------------
procedure Set_Dynamic_Offset_To_Top
(This : System.Address;

View File

@ -227,7 +227,7 @@ package body Ada.Text_IO.Decimal_Aux is
end Puts_Dec;
--------------
-- Puts_Dec --
-- Puts_LLD --
--------------
procedure Puts_LLD

View File

@ -229,7 +229,7 @@ package body Ada.Wide_Text_IO.Decimal_Aux is
end Puts_Dec;
--------------
-- Puts_Dec --
-- Puts_LLD --
--------------
procedure Puts_LLD

View File

@ -229,7 +229,7 @@ package body Ada.Wide_Wide_Text_IO.Decimal_Aux is
end Puts_Dec;
--------------
-- Puts_Dec --
-- Puts_LLD --
--------------
procedure Puts_LLD

View File

@ -1199,7 +1199,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
end Saturate;
-------------
-- vmulsxs --
-- vmulxsx --
-------------
function vmulxsx
@ -2994,9 +2994,9 @@ package body GNAT.Altivec.Low_Level_Vectors is
return To_Vector (D);
end vmaxsw;
--------------
-- vmaxsxfp --
--------------
------------
-- vmaxfp --
------------
function vmaxfp (A : LL_VF; B : LL_VF) return LL_VF is
VA : constant VF_View := To_View (A);
@ -3279,7 +3279,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
end vmsumubm;
--------------
-- vmsumumbm --
-- vmsummbm --
--------------
function vmsummbm (A : LL_VSC; B : LL_VSC; C : LL_VSI) return LL_VSI is
@ -4347,7 +4347,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
end stvx;
------------
-- stvewx --
-- stvebx --
------------
procedure stvebx (A : LL_VSC; B : c_int; C : c_ptr) is

View File

@ -46,7 +46,7 @@ package body System.Exceptions_Debug is
end Debug_Raise_Exception;
-------------------------------
-- Debug_unhandled_Exception --
-- Debug_Unhandled_Exception --
-------------------------------
procedure Debug_Unhandled_Exception (E : SSL.Exception_Data_Ptr) is

View File

@ -72,7 +72,7 @@ package body System.Partition_Interface is
end Check;
-----------------------------
-- Get_Active_Partition_Id --
-- Get_Active_Partition_ID --
-----------------------------
function Get_Active_Partition_ID
@ -103,7 +103,7 @@ package body System.Partition_Interface is
end Get_Active_Version;
----------------------------
-- Get_Local_Partition_Id --
-- Get_Local_Partition_ID --
----------------------------
function Get_Local_Partition_ID return System.RPC.Partition_ID is

View File

@ -507,9 +507,9 @@ package body System.Shared_Storage is
raise;
end Shared_Var_Unlock;
---------------------
-- Share_Var_WOpen --
---------------------
----------------------
-- Shared_Var_WOpen --
----------------------
function Shared_Var_WOpen (Var : String) return SIO.Stream_Access is
SFE : Shared_Var_File_Entry_Ptr;

View File

@ -395,9 +395,9 @@ package body System.Traceback is
return True;
end Pop_Frame;
---------------------------------
-- Prepare_State_For_Unwind_Of --
---------------------------------
---------------------------
-- Prepare_For_Unwind_Of --
---------------------------
function Prepare_For_Unwind_Of
(Frame : not null access CFD) return Boolean

View File

@ -193,9 +193,9 @@ package body Prepcomp is
end if;
end Check_Symbols;
------------------------------
-- Parse_Preprocessing_Data --
------------------------------
-----------------------------------
-- Parse_Preprocessing_Data_File --
-----------------------------------
procedure Parse_Preprocessing_Data_File (N : File_Name_Type) is
OK : Boolean := False;

View File

@ -4288,9 +4288,9 @@ package body Sem_Ch4 is
end if;
end Check_High_Bound;
-----------------------------
-- Is_Universal_Expression --
-----------------------------
--------------------------------
-- Check_Universal_Expression --
--------------------------------
procedure Check_Universal_Expression (N : Node_Id) is
begin

View File

@ -307,9 +307,9 @@ package body Sem_Ch6 is
-- Tree traversal routine that clones the defining identifier of
-- iterator and loop parameter specification nodes.
----------------
-- Check_Node --
----------------
--------------
-- Clone_Id --
--------------
function Clone_Id (Node : Node_Id) return Traverse_Result is
begin
@ -10349,7 +10349,7 @@ package body Sem_Ch6 is
-- conformant with the profile of Subp; return Empty if not found.
---------------------------------
-- Check_Confirming_Parameters --
-- Check_Conforming_Parameters --
---------------------------------
function Check_Conforming_Parameters

View File

@ -352,7 +352,7 @@ package body Sem_Dist is
end Package_Specification_Of_Scope;
--------------------------
-- Process_Partition_ID --
-- Process_Partition_Id --
--------------------------
procedure Process_Partition_Id (N : Node_Id) is

View File

@ -4904,9 +4904,9 @@ package body Sem_Prag is
end loop;
end Analyze_Unmodified_Or_Unused;
-----------------------------------
-- Analyze_Unreference_Or_Unused --
-----------------------------------
------------------------------------
-- Analyze_Unreferenced_Or_Unused --
------------------------------------
procedure Analyze_Unreferenced_Or_Unused
(Is_Unused : Boolean := False)
@ -10798,9 +10798,9 @@ package body Sem_Prag is
pragma No_Return (Bad_Mechanism);
-- Signal bad mechanism name
-------------------------
-- Bad_Mechanism_Value --
-------------------------
-------------------
-- Bad_Mechanism --
-------------------
procedure Bad_Mechanism is
begin

View File

@ -9279,7 +9279,7 @@ package body Sem_Util is
end Get_Iterable_Type_Primitive;
----------------------------------
-- Get_Library_Unit_Name_string --
-- Get_Library_Unit_Name_String --
----------------------------------
procedure Get_Library_Unit_Name_String (Decl_Node : Node_Id) is

View File

@ -7255,9 +7255,9 @@ package body Sinfo is
T = V11;
end Nkind_In;
-----------------
-- Pragma_Name --
-----------------
--------------------------
-- Pragma_Name_Unmapped --
--------------------------
function Pragma_Name_Unmapped (N : Node_Id) return Name_Id is
begin

View File

@ -179,7 +179,7 @@ package body Switch is
end Is_Switch;
-----------------
-- Switch_last --
-- Switch_Last --
-----------------
function Switch_Last (Switch_Chars : String) return Natural is