diff options
author | Arnaud Charlet <charlet@adacore.com> | 2016-06-22 09:47:02 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-22 11:47:02 +0200 |
commit | 3bb91f983bc2d530e31ca3615cde2fb1c563005a (patch) | |
tree | 3cd96afc28e73ca4467c5b9af0d037b6fc26cf56 /gcc/ada | |
parent | f9405b6348ba821cdc6a9d4c2e0e03050b16a0f9 (diff) | |
download | gcc-3bb91f983bc2d530e31ca3615cde2fb1c563005a.zip gcc-3bb91f983bc2d530e31ca3615cde2fb1c563005a.tar.gz gcc-3bb91f983bc2d530e31ca3615cde2fb1c563005a.tar.bz2 |
lib.ads: Code cleanup.
2016-06-22 Arnaud Charlet <charlet@adacore.com>
* lib.ads: Code cleanup.
* inline.adb: Type refinement for a counter variable.
* lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
Code cleanup.
From-SVN: r237682
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/inline.adb | 2 | ||||
-rw-r--r-- | gcc/ada/lib-xref-spark_specific.adb | 23 | ||||
-rw-r--r-- | gcc/ada/lib.ads | 40 |
4 files changed, 30 insertions, 42 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1d60521..851424d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2016-06-22 Arnaud Charlet <charlet@adacore.com> + + * lib.ads: Code cleanup. + * inline.adb: Type refinement for a counter variable. + * lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code. + Code cleanup. + 2016-06-21 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index b6db273..d205636 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -3868,7 +3868,7 @@ package body Inline is -- the body is an internal error. procedure Instantiate_Bodies is - J : Int; + J : Nat; Info : Pending_Body_Info; begin diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb index 081a362..7e131f0 100644 --- a/gcc/ada/lib-xref-spark_specific.adb +++ b/gcc/ada/lib-xref-spark_specific.adb @@ -201,27 +201,6 @@ package body SPARK_Specific is end loop; end; - -- Remove those scopes previously marked for removal - - declare - Scope_Id : Scope_Index; - - begin - Scope_Id := From; - for Index in From .. SPARK_Scope_Table.Last loop - declare - S : SPARK_Scope_Record renames SPARK_Scope_Table.Table (Index); - begin - if S.Scope_Num /= 0 then - SPARK_Scope_Table.Table (Scope_Id) := S; - Scope_Id := Scope_Id + 1; - end if; - end; - end loop; - - SPARK_Scope_Table.Set_Last (Scope_Id - 1); - end; - -- Make entry for new file in file table Get_Name_String (Reference_Name (File)); @@ -236,6 +215,8 @@ package body SPARK_Specific is then Get_Name_String (Reference_Name (Main_Source_File)); Unit_File_Name := new String'(Name_Buffer (1 .. Name_Len)); + else + Unit_File_Name := null; end if; SPARK_File_Table.Append ( diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads index 0738cd7..4f8ffee 100644 --- a/gcc/ada/lib.ads +++ b/gcc/ada/lib.ads @@ -418,25 +418,25 @@ package Lib is -- but tools can use this status (e.g. ASIS looking at the generated -- tree) to know that a fatal error was detected. - function Cunit (U : Unit_Number_Type) return Node_Id; - function Cunit_Entity (U : Unit_Number_Type) return Entity_Id; - function Dependency_Num (U : Unit_Number_Type) return Nat; - function Dynamic_Elab (U : Unit_Number_Type) return Boolean; - function Error_Location (U : Unit_Number_Type) return Source_Ptr; - function Expected_Unit (U : Unit_Number_Type) return Unit_Name_Type; - function Fatal_Error (U : Unit_Number_Type) return Fatal_Type; - function Generate_Code (U : Unit_Number_Type) return Boolean; - function Ident_String (U : Unit_Number_Type) return Node_Id; - function Has_RACW (U : Unit_Number_Type) return Boolean; - function Loading (U : Unit_Number_Type) return Boolean; - function Main_CPU (U : Unit_Number_Type) return Int; - function Main_Priority (U : Unit_Number_Type) return Int; - function Munit_Index (U : Unit_Number_Type) return Nat; - function No_Elab_Code_All (U : Unit_Number_Type) return Boolean; - function OA_Setting (U : Unit_Number_Type) return Character; - function Source_Index (U : Unit_Number_Type) return Source_File_Index; - function Unit_File_Name (U : Unit_Number_Type) return File_Name_Type; - function Unit_Name (U : Unit_Number_Type) return Unit_Name_Type; + function Cunit (U : Unit_Number_Type) return Node_Id; + function Cunit_Entity (U : Unit_Number_Type) return Entity_Id; + function Dependency_Num (U : Unit_Number_Type) return Nat; + function Dynamic_Elab (U : Unit_Number_Type) return Boolean; + function Error_Location (U : Unit_Number_Type) return Source_Ptr; + function Expected_Unit (U : Unit_Number_Type) return Unit_Name_Type; + function Fatal_Error (U : Unit_Number_Type) return Fatal_Type; + function Generate_Code (U : Unit_Number_Type) return Boolean; + function Ident_String (U : Unit_Number_Type) return Node_Id; + function Has_RACW (U : Unit_Number_Type) return Boolean; + function Loading (U : Unit_Number_Type) return Boolean; + function Main_CPU (U : Unit_Number_Type) return Int; + function Main_Priority (U : Unit_Number_Type) return Int; + function Munit_Index (U : Unit_Number_Type) return Nat; + function No_Elab_Code_All (U : Unit_Number_Type) return Boolean; + function OA_Setting (U : Unit_Number_Type) return Character; + function Source_Index (U : Unit_Number_Type) return Source_File_Index; + function Unit_File_Name (U : Unit_Number_Type) return File_Name_Type; + function Unit_Name (U : Unit_Number_Type) return Unit_Name_Type; -- Get value of named field from given units table entry procedure Set_Cunit (U : Unit_Number_Type; N : Node_Id); @@ -485,7 +485,7 @@ package Lib is function Exact_Source_Name (Loc : Source_Ptr) return String; -- Return name of entity at location Loc exactly as written in the source. - -- this includes copying the wide character encodings exactly as they were + -- This includes copying the wide character encodings exactly as they were -- used in the source, so the caller must be aware of the possibility of -- such encodings. |