From: Arnaud Charlet Date: Wed, 24 Apr 2013 14:35:42 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd3b3672c49e3cee97fdd35d5c72c849af952862;p=gcc.git [multiple changes] 2013-04-24 Robert Dewar * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor reformatting. 2013-04-24 Yannick Moy * sem_ch6.adb (Analyze_Generic_Subprogram_Body, Analyze_Subprogram_Body_Helper): Reset contract node to Empty before setting entity to E_Subprogram_Body. * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to Empty before setting entity to E_Subprogram_Body. From-SVN: r198238 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4c7bc4af654..91c529c5e87 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2013-04-24 Robert Dewar + + * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor + reformatting. + +2013-04-24 Yannick Moy + + * sem_ch6.adb (Analyze_Generic_Subprogram_Body, + Analyze_Subprogram_Body_Helper): Reset contract node to Empty + before setting entity to E_Subprogram_Body. + * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to + Empty before setting entity to E_Subprogram_Body. + 2013-04-24 Vincent Celier * gnat_ugn.texi: Document new gnatls switch -aPdir. diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index 6ffa07fd9ba..d6fd28e8e47 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -1766,13 +1766,10 @@ begin (Root_Environment.Project_Path, Argv (Argv'First + 3 .. Argv'Last)); - -- Pass -aPdir to gnatls + -- Pass -aPdir to gnatls, but not to other tools if The_Command = List then Arg_Num := Arg_Num + 1; - - -- but not to other tools - else Remove_Switch (Arg_Num); end if; diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index cf0e3c32c27..ae623897d6c 100644 --- a/gcc/ada/gnatls.adb +++ b/gcc/ada/gnatls.adb @@ -1252,8 +1252,7 @@ procedure Gnatls is procedure Scan_Ls_Arg (Argv : String) is FD : File_Descriptor; Len : Integer; - - OK : Boolean; + OK : Boolean; begin pragma Assert (Argv'First = 1); diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 4ab65705255..0d32aff31aa 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1335,7 +1335,7 @@ package body Sem_Ch13 is Chars => Chars (Id), Expression => Relocate_Node (Expr)); - -- If the address is specified we treat the entity as + -- If the address is specified, then we treat the entity as -- referenced, to avoid spurious warnings. This is analogous -- to what is done with an attribute definition clause, but -- here we don't want to generate a reference because this diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 91cf3efa423..c6db45270ba 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1107,6 +1107,7 @@ package body Sem_Ch6 is -- Visible generic entity is callable within its own body Set_Ekind (Gen_Id, Ekind (Body_Id)); + Set_Contract (Body_Id, Empty); Set_Ekind (Body_Id, E_Subprogram_Body); Set_Convention (Body_Id, Convention (Gen_Id)); Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Gen_Id)); @@ -2902,6 +2903,7 @@ package body Sem_Ch6 is end if; Set_Corresponding_Body (Unit_Declaration_Node (Spec_Id), Body_Id); + Set_Contract (Body_Id, Empty); Set_Ekind (Body_Id, E_Subprogram_Body); Set_Scope (Body_Id, Scope (Spec_Id)); Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Spec_Id)); diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 12b37f447a4..4fdef1cdac2 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -2435,6 +2435,7 @@ package body Sem_Ch8 is -- constructed later at the freeze point, so indicate that the -- completion has not been seen yet. + Set_Contract (New_S, Empty); Set_Ekind (New_S, E_Subprogram_Body); New_S := Rename_Spec; Set_Has_Completion (Rename_Spec, False); diff --git a/gcc/ada/xref_lib.adb b/gcc/ada/xref_lib.adb index db83c94e2b2..2afec821079 100644 --- a/gcc/ada/xref_lib.adb +++ b/gcc/ada/xref_lib.adb @@ -274,6 +274,7 @@ package body Xref_Lib is declare File_Name : String := Entity (File_Start .. Line_Start - 1); + begin Osint.Canonical_Case_File_Name (File_Name); File_Ref := Add_To_Xref_File (File_Name, Visited => True);