[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 24 Apr 2013 14:35:42 +0000 (16:35 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 24 Apr 2013 14:35:42 +0000 (16:35 +0200)
2013-04-24  Robert Dewar  <dewar@adacore.com>

* gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
reformatting.

2013-04-24  Yannick Moy  <moy@adacore.com>

* 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

gcc/ada/ChangeLog
gcc/ada/gnatcmd.adb
gcc/ada/gnatls.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch8.adb
gcc/ada/xref_lib.adb

index 4c7bc4a..91c529c 100644 (file)
@@ -1,3 +1,16 @@
+2013-04-24  Robert Dewar  <dewar@adacore.com>
+
+       * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
+       reformatting.
+
+2013-04-24  Yannick Moy  <moy@adacore.com>
+
+       * 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  <celier@adacore.com>
 
        * gnat_ugn.texi: Document new gnatls switch -aPdir.
index 6ffa07f..d6fd28e 100644 (file)
@@ -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;
index cf0e3c3..ae62389 100644 (file)
@@ -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);
index 4ab6570..0d32aff 100644 (file)
@@ -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
index 91cf3ef..c6db452 100644 (file)
@@ -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));
index 12b37f4..4fdef1c 100644 (file)
@@ -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);
index db83c94..2afec82 100644 (file)
@@ -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);