[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 4c7bc4af6540c60cb75a7d714afaef90eacd818e..91c529c5e87bbfe3002446103be72a477aa385e8 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 6ffa07fd9ba42d33d0e677e42895aae078dc7c94..d6fd28e8e47ad8582b51aac0d5a2dcfc65e36989 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 cf0e3c32c27d097971480cb12208b262b4d177cd..ae623897d6cc51574b56277306eaa864080af23a 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 4ab65705255cc9f0d721a1873e6cf99f8d7cd4f2..0d32aff31aa4d300b292269dbfc7523e401c2a5d 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 91cf3efa423cc3a9443b25dab7e85fc3373aae7c..c6db45270ba9b1770a97a2c75625dd39623e6831 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 12b37f447a42ebcb4db2557fe8acdc5a49a1bbe4..4fdef1cdac22ff46e9b979b5a0209187d8e55a88 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 db83c94e2b2ff8d491c3b356dba9b6df5a79577b..2afec82107965efa83047109aaa6b0c8fd503f0b 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);