]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 17 Aug 2009 09:45:27 +0000 (11:45 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 17 Aug 2009 09:45:27 +0000 (11:45 +0200)
2009-08-17  Ed Schonberg  <schonberg@adacore.com>

* exp_ch3.adb (Build_Discriminant_Formals): If the discriminals already
exist, as is the case for synchronized types, use the type of the
discriminal in the parameter specification, to prevent a spurious
subtype mismatch in gigi.

2009-08-17  Robert Dewar  <dewar@adacore.com>

* prj-env.adb: Minor reformatting
* make.adb: Minor reformatting
Comment updates

2009-08-17  Javier Miranda  <miranda@adacore.com>

* exp_ch7.adb (Wrap_Transient_Expression): Update comments.

From-SVN: r150828

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch7.adb
gcc/ada/make.adb
gcc/ada/prj-env.adb

index ebbd96d6cc25423964b3ea238ca4c88622ae9793..a8cc86b4770b6b42840bfcf0f3bd3dce90ad0ebd 100644 (file)
@@ -1,3 +1,27 @@
+2009-08-17  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch3.adb (Build_Discriminant_Formals): If the discriminals already
+       exist, as is the case for synchronized types, use the type of the
+       discriminal in the parameter specification, to prevent a spurious
+       subtype mismatch in gigi.
+
+2009-08-17  Robert Dewar  <dewar@adacore.com>
+
+       * prj-env.adb: Minor reformatting
+       * make.adb: Minor reformatting
+       Comment updates
+
+2009-08-17  Javier Miranda  <miranda@adacore.com>
+
+       * exp_ch7.adb (Wrap_Transient_Expression): Update comments.
+
+2009-08-17  Emmanuel Briot  <briot@adacore.com>
+
+       * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-conf.adb
+       (Processing_Flags.Require_Obj_Dirs): new field, which controls whether
+       object directories must be present. In the case of gprclean at least,
+       these are optional (if they do not exist there is nothing to clean)
+
 2009-08-17  Robert Dewar  <dewar@adacore.com>
 
        * prj-env.adb: Minor reformatting
index c0861e30890899356d9b8d08747d73a885e51bd8..414e56701155e141de992505434e5d4ef29b7162 100644 (file)
@@ -95,10 +95,11 @@ package body Exp_Ch3 is
      (Rec_Id : Entity_Id;
       Use_Dl : Boolean) return List_Id;
    --  This function uses the discriminants of a type to build a list of
-   --  formal parameters, used in the following function. If the flag Use_Dl
-   --  is set, the list is built using the already defined discriminals
-   --  of the type. Otherwise new identifiers are created, with the source
-   --  names of the discriminants.
+   --  formal parameters, used in Build_Init_Procedure among other places.
+   --  If the flag Use_Dl is set, the list is built using the already
+   --  defined discriminals of the type, as is the case for concurrent
+   --  types with discriminants. Otherwise new identifiers are created,
+   --  with the source names of the discriminants.
 
    function Build_Equivalent_Array_Aggregate (T : Entity_Id) return Node_Id;
    --  This function builds a static aggregate that can serve as the initial
@@ -1141,6 +1142,7 @@ package body Exp_Ch3 is
       Parameter_List  : constant List_Id := New_List;
       D               : Entity_Id;
       Formal          : Entity_Id;
+      Formal_Type     : Entity_Id;
       Param_Spec_Node : Node_Id;
 
    begin
@@ -1151,15 +1153,17 @@ package body Exp_Ch3 is
 
             if Use_Dl then
                Formal := Discriminal (D);
+               Formal_Type := Etype (Formal);
             else
                Formal := Make_Defining_Identifier (Loc, Chars (D));
+               Formal_Type := Etype (D);
             end if;
 
             Param_Spec_Node :=
               Make_Parameter_Specification (Loc,
                   Defining_Identifier => Formal,
                 Parameter_Type =>
-                  New_Reference_To (Etype (D), Loc));
+                  New_Reference_To (Formal_Type, Loc));
             Append (Param_Spec_Node, Parameter_List);
             Next_Discriminant (D);
          end loop;
index 8e7ecbc411068c085a1db2d7b9571f14da3f3f8f..a4f6a66fd9ba471b8a104afdfa66e9aa42dcd179 100644 (file)
@@ -3554,9 +3554,7 @@ package body Exp_Ch7 is
       Loc  : constant Source_Ptr := Sloc (N);
       E    : constant Entity_Id  := Make_Temporary (Loc, 'E', N);
       Etyp : constant Entity_Id  := Etype (N);
-
-      Expr : constant Node_Id := Relocate_Node (N);
-      --  Capture this node because the call to Adjust_SCIL_Node can ???
+      Expr : constant Node_Id    := Relocate_Node (N);
 
    begin
       --  If the relocated node is a function call then check if some SCIL
index 8b5bb0022f9bcfb756bf303dd14720e743862646..69e00f31ecec3e3f4272dbe9bbffb2026dbc820b 100644 (file)
@@ -645,7 +645,7 @@ package body Make is
    --  the fact that this ALI file is read-only.
 
    procedure Process_Multilib;
-   --  Add appropriate --RTS argument to handle multilib.
+   --  Add appropriate --RTS argument to handle multilib
 
    ----------------------------------------------------
    -- Compiler, Binder & Linker Data and Subprograms --
@@ -7304,7 +7304,6 @@ package body Make is
    ----------------------
 
    procedure Process_Multilib is
-
       Output_FD         : File_Descriptor;
       Output_Name       : String_Access;
       Arg_Index         : Natural := 0;
@@ -7331,7 +7330,6 @@ package body Make is
                Arg_Index := Arg_Index + 1;
                Args (Arg_Index) := new String'(Argv);
             end if;
-
          end;
       end loop;
 
@@ -7345,22 +7343,24 @@ package body Make is
          Multilib_Gcc := Gcc;
       end if;
 
-      Multilib_Gcc_Path :=
-        GNAT.OS_Lib.Locate_Exec_On_Path (Multilib_Gcc.all);
+      Multilib_Gcc_Path := GNAT.OS_Lib.Locate_Exec_On_Path (Multilib_Gcc.all);
 
       Create_Temp_File (Output_FD, Output_Name);
+
       if Output_FD = Invalid_FD then
          return;
       end if;
 
-      GNAT.OS_Lib.Spawn (Multilib_Gcc_Path.all, Args, Output_FD,
-                         Return_Code, False);
+      GNAT.OS_Lib.Spawn
+        (Multilib_Gcc_Path.all, Args, Output_FD, Return_Code, False);
       Close (Output_FD);
+
       if Return_Code /= 0 then
          return;
       end if;
 
       Output_FD := Open_Read (Output_Name.all, Binary);
+
       if Output_FD = Invalid_FD then
          return;
       end if;
@@ -7382,9 +7382,7 @@ package body Make is
       end if;
 
       Scan_Make_Arg ("-margs", And_Save => True);
-      Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read),
-                     And_Save => True);
-
+      Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read), And_Save => True);
    end Process_Multilib;
 
    -----------------------------
@@ -7396,6 +7394,7 @@ package body Make is
       Seen : Project_Boolean_Htable.Instance := Project_Boolean_Htable.Nil;
 
       procedure Recurse (Prj : Project_Id; Depth : Natural);
+      --  Recursive procedure that does the work, keeping track of the depth
 
       -------------
       -- Recurse --
index c14cbd63d207a73b5e00add588cb6eb19ea6cfb3..0ffacdbdc5b5687a411b0f3838dfb356a8b19c9d 100644 (file)
@@ -222,8 +222,6 @@ package body Prj.Env is
    -- Add_To_Buffer --
    -------------------
 
-   --  Wouldn't it be more consistent to use a Table for Buffer ???
-
    procedure Add_To_Buffer
      (S           : String;
       Buffer      : in out String_Access;
@@ -236,7 +234,6 @@ package body Prj.Env is
          declare
             New_Buffer : constant String_Access :=
                            new String (1 .. 2 * Buffer'Last);
-
          begin
             New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last);
             Free (Buffer);