OSDN Git Service

* gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
[pf3gnuchains/gcc-fork.git] / gcc / ada / sem_elab.ads
index bf2c6ce..2bea37d 100644 (file)
@@ -6,22 +6,20 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                                                                          --
---          Copyright (C) 1997-2001 Free Software Foundation, Inc.          --
+--          Copyright (C) 1997-2011, 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- --
--- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
--- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license.          --
 --                                                                          --
 -- 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.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
@@ -87,7 +85,7 @@ package Sem_Elab is
    --  Note on pragma Elaborate. The checking here assumes that a pragma
    --  Elaborate on a with'ed unit guarantees that subprograms within the
    --  unit can be called without causing an ABE. This is not in fact the
-   --  case since pragma Elaborate does not guarantee the transititive
+   --  case since pragma Elaborate does not guarantee the transitive
    --  coverage guaranteed by Elaborate_All. However, we leave this issue
    --  up to the binder, which has generates warnings if there are possible
    --  problems in the use of pragma Elaborate.
@@ -120,12 +118,16 @@ package Sem_Elab is
    --  the resulting code does not contain subprogram specs with no
    --  corresponding bodies.
 
-   procedure Check_Elab_Call (N : Node_Id; Outer_Scope : Entity_Id := Empty);
-   --  Check a call for possible elaboration problems. N is either an
-   --  N_Function_Call or N_Procedure_Call_Statement node, and Outer
-   --  indicates whether this is an outer level call from Sem_Res
-   --  (Outer_Scope set to Empty), or an internal recursive call
-   --  (Outer_Scope set to entity of outermost call, see body).
+   procedure Check_Elab_Call
+     (N            : Node_Id;
+      Outer_Scope  : Entity_Id := Empty;
+      In_Init_Proc : Boolean   := False);
+   --  Check a call for possible elaboration problems. The node N is either
+   --  an N_Function_Call or N_Procedure_Call_Statement node. The Outer_Scope
+   --  argument indicates whether this is an outer level call from Sem_Res
+   --  (Outer_Scope set to Empty), or an internal recursive call (Outer_Scope
+   --  set to entity of outermost call, see body). Flag In_Init_Proc should be
+   --  set whenever the current context is a type init proc.
 
    procedure Check_Elab_Calls;
    --  Not all the processing for Check_Elab_Call can be done at the time
@@ -134,6 +136,12 @@ package Sem_Elab is
    --  instantiated. The Check_Elab_Calls procedure cleans up these waiting
    --  checks. It is called once after the completion of instantiation.
 
+   procedure Check_Elab_Assign (N : Node_Id);
+   --  N is either the left side of an assignment, or a procedure argument for
+   --  a mode OUT or IN OUT formal. This procedure checks for a possible case
+   --  of access to an entity from elaboration code before the entity has been
+   --  initialized, and issues appropriate warnings.
+
    procedure Check_Elab_Instantiation
      (N           : Node_Id;
       Outer_Scope : Entity_Id := Empty);