OSDN Git Service

PR bootstrap/11932
[pf3gnuchains/gcc-fork.git] / gcc / ada / exp_ch3.ads
index ff65667..7de6498 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                            $Revision: 1.36 $
---                                                                          --
---           Copyright (C) 1992-2001 Free Software Foundation, Inc.         --
+--           Copyright (C) 1992-2003 Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
 -- MA 02111-1307, USA.                                                      --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --  Expand routines for chapter 3 constructs
 
-with Types; use Types;
+with Types;  use Types;
 with Elists; use Elists;
 
 package Exp_Ch3 is
@@ -38,8 +36,8 @@ package Exp_Ch3 is
    procedure Expand_N_Variant_Part               (N : Node_Id);
    procedure Expand_N_Full_Type_Declaration      (N : Node_Id);
 
-   procedure Expand_Previous_Access_Type (N : Node_Id; Def_Id : Entity_Id);
-   --  For a full type declaration that contains tasks,  or that is a task,
+   procedure Expand_Previous_Access_Type (Def_Id : Entity_Id);
+   --  For a full type declaration that contains tasks, or that is a task,
    --  check whether there exists an access type whose designated type is an
    --  incomplete declarations for the current composite type. If so, build
    --  the master for that access type, now that it is known to denote an
@@ -54,21 +52,22 @@ package Exp_Ch3 is
    --  and the discriminant checking functions are inserted after this node.
 
    function Build_Initialization_Call
-     (Loc          : Source_Ptr;
-      Id_Ref       : Node_Id;
-      Typ          : Entity_Id;
-      In_Init_Proc : Boolean := False;
-      Enclos_Type  : Entity_Id := Empty;
-      Discr_Map    : Elist_Id := New_Elmt_List)
-      return         List_Id;
+     (Loc               : Source_Ptr;
+      Id_Ref            : Node_Id;
+      Typ               : Entity_Id;
+      In_Init_Proc      : Boolean := False;
+      Enclos_Type       : Entity_Id := Empty;
+      Discr_Map         : Elist_Id := New_Elmt_List;
+      With_Default_Init : Boolean := False)
+      return              List_Id;
    --  Builds a call to the initialization procedure of the Id entity. Id_Ref
    --  is either a new reference to Id (for record fields), or an indexed
    --  component (for array elements). Loc is the source location for the
    --  constructed tree, and Typ is the type of the entity (the initialization
    --  procedure of the base type is the procedure that actually gets called).
-   --  In_Init_Proc has to be set to True when the call is itself in an Init
-   --  procedure in order to enable the use of discriminals. Enclos_type is
-   --  the type of the init_proc and it is used for various expansion cases
+   --  In_Init_Proc has to be set to True when the call is itself in an init
+   --  proc in order to enable the use of discriminals. Enclos_type is the
+   --  type of the init proc and it is used for various expansion cases
    --  including the case where Typ is a task type which is a array component,
    --  the indices of the enclosing type are used to build the string that
    --  identifies each task at runtime.
@@ -78,6 +77,10 @@ package Exp_Ch3 is
    --  entry families bounded by discriminants, protected type discriminants
    --  can appear within expressions in array bounds (not as stand-alone
    --  identifiers) and a general replacement is necessary.
+   --
+   --  Ada0Y (AI-287): With_Default_Init is used to indicate that the initia-
+   --  lization call corresponds to a default initialized component of an
+   --  aggregate.
 
    procedure Freeze_Type (N : Node_Id);
    --  This procedure executes the freezing actions associated with the given