From: Piotr Trojanek Date: Mon, 7 Dec 2020 23:22:20 +0000 (+0100) Subject: [Ada] Remove double initialization of interpretation tables X-Git-Tag: basepoints/gcc-13~8121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ba1f7f65b46c1f0e0143ec982a62e6bd9a3ef2e;p=thirdparty%2Fgcc.git [Ada] Remove double initialization of interpretation tables gcc/ada/ * fmap.ads (Reset_Tables): Remove outdated references to GNSA/ASIS. * sem_eval.ads (Initialize): Likewise. * sem_type.adb (Headers): Remove initialization at elaboration. * sem_type.ads (Init_Interp_Tables): Remove outdated reference to gnatf. * stringt.ads (Initialize): Fix style in comment. --- diff --git a/gcc/ada/fmap.ads b/gcc/ada/fmap.ads index 862b8eab74fb..aae32191499f 100644 --- a/gcc/ada/fmap.ads +++ b/gcc/ada/fmap.ads @@ -68,10 +68,7 @@ package Fmap is -- mapping file whose file name is File_Name. procedure Reset_Tables; - -- Initialize all the internal data structures. This procedure is used - -- when several compilations are performed by the same process (by GNSA - -- for ASIS, for example) to remove any existing mappings from a previous - -- compilation. + -- Initialize all the internal data structures procedure Add_Forbidden_File_Name (Name : File_Name_Type); -- Indicate that a source file name is forbidden. This is used when there diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index 972cee646d79..3cbd43826802 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -556,8 +556,7 @@ package Sem_Eval is -- messages must always point to the same location as the parent message. procedure Initialize; - -- Initializes the internal data structures. Must be called before each - -- separate main program unit (e.g. in a GNSA/ASIS context). + -- Initializes the internal data structures private -- The Eval routines are all marked inline, since they are called once diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index 8dbfa182923f..8f636be9914f 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -97,7 +97,7 @@ package body Sem_Type is Header_Size : constant Int := 2 ** 12; No_Entry : constant Int := -1; - Headers : array (0 .. Header_Size) of Int := (others => No_Entry); + Headers : array (0 .. Header_Size) of Int; package Interp_Map is new Table.Table ( Table_Component_Type => Interp_Ref, diff --git a/gcc/ada/sem_type.ads b/gcc/ada/sem_type.ads index 4dea6e2076d0..3177bd388221 100644 --- a/gcc/ada/sem_type.ads +++ b/gcc/ada/sem_type.ads @@ -94,7 +94,7 @@ package Sem_Type is ----------------- procedure Init_Interp_Tables; - -- Invoked by gnatf when processing multiple files + -- Initialize data structures for overload resolution procedure Collect_Interps (N : Node_Id); -- Invoked when the name N has more than one visible interpretation. This diff --git a/gcc/ada/stringt.ads b/gcc/ada/stringt.ads index 77a794e03c4d..b85a590d59c5 100644 --- a/gcc/ada/stringt.ads +++ b/gcc/ada/stringt.ads @@ -56,7 +56,7 @@ package Stringt is -------------------------------------- procedure Initialize; - -- Initializes the strings table for a new compilation. + -- Initializes the strings table for a new compilation procedure Lock; -- Lock internal tables before calling back end