]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2009-04-29 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 2009 09:32:55 +0000 (09:32 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 2009 09:32:55 +0000 (09:32 +0000)
* rtsfind.adb, prj-env.adb: Minor reformatting
Minor code reorganization

2009-04-29  Emmanuel Briot  <briot@adacore.com>

* make.adb: Fix comment

* prj.adb (Ultimate_Extending_Project_Of): Fix handling when no project
is given as argument, as might happen in gnatmake.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146935 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/make.adb
gcc/ada/prj-env.adb
gcc/ada/prj.adb
gcc/ada/rtsfind.adb

index 268cd62ac70f59b17ed44e7a243e13a0827d9364..30b7b301e89ad334010ff0081e380a10c69a3f5f 100644 (file)
@@ -1,3 +1,15 @@
+2009-04-29  Robert Dewar  <dewar@adacore.com>
+
+       * rtsfind.adb, prj-env.adb: Minor reformatting
+       Minor code reorganization
+
+2009-04-29  Emmanuel Briot  <briot@adacore.com>
+
+       * make.adb: Fix comment
+
+       * prj.adb (Ultimate_Extending_Project_Of): Fix handling when no project
+       is given as argument, as might happen in gnatmake.
+
 2009-04-29  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch3.adb (Check_Abstract_Overriding): Improve error message when
index 0e274e81a0729738c7831eee7cd956f03681a193..f7d7b37a15a1647c7cc36fe38065d2415c92cf68 100644 (file)
@@ -7469,7 +7469,7 @@ package body Make is
 
       begin
          if Prj.Depth >= Depth
-           or Get (Seen, Prj)    -- or needed instead of or else ???
+           or else Get (Seen, Prj)
          then
             return;
          end if;
index 25a23291b3bdd0519ff2e861287a315e5aebd719..0a06975ced8e32d923bab448586c304232f32da4 100644 (file)
@@ -954,11 +954,13 @@ package body Prj.Env is
          end if;
 
       --  If language is defined
+
       else
          --  For all source of the Language of all projects in the closure
 
          declare
             P : Project_List;
+
          begin
             P := In_Tree.Projects;
             while P /= null loop
@@ -1054,7 +1056,7 @@ package body Prj.Env is
 
    procedure Delete_All_Path_Files (In_Tree : Project_Tree_Ref) is
       Disregard : Boolean := True;
-      pragma Warnings (Off, Disregard);
+      pragma Unreferenced (Disregard);
 
    begin
       for Index in Path_File_Table.First ..
@@ -1846,9 +1848,10 @@ package body Prj.Env is
    function Ultimate_Extension_Of
      (Project : Project_Id) return Project_Id
    is
-      Result : Project_Id := Project;
+      Result : Project_Id;
 
    begin
+      Result := Project;
       while Result.Extended_By /= No_Project loop
          Result := Result.Extended_By;
       end loop;
index f79716944f5be33dd397ece9ba85b1f9e45d61cc..49d9c5711a0edb2add9ed95a282a4e96d83e4004 100644 (file)
@@ -828,6 +828,7 @@ package body Prj is
    procedure Free (Project : in out Project_Id; Reset_Only : Boolean) is
       procedure Unchecked_Free is new Ada.Unchecked_Deallocation
         (Project_Data, Project_Id);
+
    begin
       if Project /= null then
          Free (Project.Include_Path);
@@ -891,9 +892,11 @@ package body Prj is
       procedure Unchecked_Free is new Ada.Unchecked_Deallocation
         (Project_List_Element, Project_List);
       Tmp : Project_List;
+
    begin
       while List /= null loop
          Tmp := List.Next;
+
          if Free_Project then
             Free (List.Project, Reset_Only => Reset_Only);
          end if;
@@ -950,6 +953,8 @@ package body Prj is
          Source_Path_Table.Free (Tree.Private_Part.Source_Paths);
          Object_Path_Table.Free (Tree.Private_Part.Object_Paths);
 
+         Free (Tree.Private_Part.Ada_Path_Buffer);
+
          --  Naming data (nothing to free ?)
          null;
 
@@ -1385,7 +1390,7 @@ package body Prj is
 
    begin
       Prj := Proj;
-      while Prj.Extended_By /= No_Project loop
+      while Prj /= null and then Prj.Extended_By /= No_Project loop
          Prj := Prj.Extended_By;
       end loop;
 
index 45c9370456a4141873c0017aab7ff55e927ee642..76f14c177122291ac4132c2fe8e04588432433ad 100644 (file)
@@ -1459,8 +1459,10 @@ package body Rtsfind is
 
                if Chrs = Chars (Cunit_Entity (Current_Sem_Unit)) then
                   declare
-                     Parent_Name : constant Unit_Name_Type
-                       := Get_Parent_Spec_Name (Unit_Name (Current_Sem_Unit));
+                     Parent_Name : constant Unit_Name_Type :=
+                                     Get_Parent_Spec_Name
+                                       (Unit_Name (Current_Sem_Unit));
+
                   begin
                      if Parent_Name /= No_Unit_Name then
                         Get_Name_String (Parent_Name);
@@ -1468,9 +1470,9 @@ package body Rtsfind is
                         declare
                            P : String renames Name_Buffer (1 .. Name_Len);
                         begin
-                           if P = "ada.text_io%s"
-                             or else P = "ada.wide_text_io%s"
-                             or else P = "ada.wide_wide_text_io%s"
+                           if P = "ada.text_io%s"      or else
+                              P = "ada.wide_text_io%s" or else
+                              P = "ada.wide_wide_text_io%s"
                            then
                               goto Continue;
                            end if;