OSDN Git Service

* config/vax/vax.h (target_flags, MASK_UNIX_ASM, MASK_VAXC_ALIGNMENT)
[pf3gnuchains/gcc-fork.git] / gcc / ada / sem_util.ads
index 5212ffb..05df20c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2004, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2005, 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- --
@@ -110,8 +110,7 @@ package Sem_Util is
 
    procedure Check_Potentially_Blocking_Operation (N : Node_Id);
    --  N is one of the statement forms that is a potentially blocking
-   --  operation. If it appears within a protected action, emit warning
-   --  and raise Program_Error.
+   --  operation. If it appears within a protected action, emit warning.
 
    procedure Check_VMS (Construct : Node_Id);
    --  Check that this the target is OpenVMS, and if so, return with
@@ -334,6 +333,10 @@ package Sem_Util is
    --  The third argument supplies a source location for constructed
    --  nodes returned by this function.
 
+   procedure Get_Library_Unit_Name_String (Decl_Node : Node_Id);
+   --  Retrieve the fully expanded name of the library unit declared by
+   --  Decl_Node into the name buffer.
+
    function Get_Name_Entity_Id (Id : Name_Id) return Entity_Id;
    --  An entity value is associated with each name in the name table. The
    --  Get_Name_Entity_Id function fetches the Entity_Id of this entity,
@@ -375,12 +378,20 @@ package Sem_Util is
    --  Check if a type has a (sub)component of a private type that has not
    --  yet received a full declaration.
 
+   function Has_Stream (T : Entity_Id) return Boolean;
+   --  Tests if type T is derived from Ada.Streams.Root_Stream_Type, or
+   --  in the case of a composite type, has a component for which this
+   --  predicate is True, and if so returns True. Otherwise a result of
+   --  False means that there is no Stream type in sight. For a private
+   --  type, the test is applied to the underlying type (or returns False
+   --  if there is no underlying type).
+
    function Has_Tagged_Component (Typ : Entity_Id) return Boolean;
    --  Typ must be a composite type (array or record). This function is used
    --  to check if '=' has to be expanded into a bunch component comparaisons.
 
    function In_Instance return Boolean;
-   --  Returns True if the current scope is within a generic instance.
+   --  Returns True if the current scope is within a generic instance
 
    function In_Instance_Body return Boolean;
    --  Returns True if current scope is within the body of an instance, where
@@ -425,7 +436,7 @@ package Sem_Util is
    --  synthesized attribute.
 
    function Is_Actual_Parameter (N : Node_Id) return Boolean;
-   --  Determines if N is an actual parameter in a subprogram call.
+   --  Determines if N is an actual parameter in a subprogram call
 
    function Is_Aliased_View (Obj : Node_Id) return Boolean;
    --  Determine if Obj is an aliased view, i.e. the name of an
@@ -531,7 +542,7 @@ package Sem_Util is
    --  Return True if E is a remote access-to-class-wide-limited_private type
 
    function Is_Remote_Access_To_Subprogram_Type (E : Entity_Id) return Boolean;
-   --  Return True if E is a remote access to subprogram type.
+   --  Return True if E is a remote access to subprogram type
 
    function Is_Remote_Call (N : Node_Id) return Boolean;
    --  Return True if N denotes a potentially remote call
@@ -545,7 +556,8 @@ package Sem_Util is
    function Is_Statement (N : Node_Id) return Boolean;
    --  Check if the node N is a statement node. Note that this includes
    --  the case of procedure call statements (unlike the direct use of
-   --  the N_Statement_Other_Than_Procedure_Call subtype from Sinfo)
+   --  the N_Statement_Other_Than_Procedure_Call subtype from Sinfo).
+   --  Note that a label is *not* a statement, and will return False.
 
    function Is_Transfer (N : Node_Id) return Boolean;
    --  Returns True if the node N is a statement which is known to cause
@@ -630,7 +642,7 @@ package Sem_Util is
    --  the call order, so this does not correspond to simply taking the
    --  next entry of the Parameter_Associations list. The argument is an
    --  actual previously returned by a call to First_Actual or Next_Actual.
-   --  Note tha the result produced is always an expression, not a parameter
+   --  Note that the result produced is always an expression, not a parameter
    --  assciation node, even if named notation was used.
 
    procedure Normalize_Actuals
@@ -771,15 +783,14 @@ package Sem_Util is
    --  Set the flag Is_Transient of the current scope
 
    procedure Set_Size_Info (T1, T2 : Entity_Id);
-   --  Copies the Esize field and Has_Biased_Representation flag from
-   --  (sub)type entity T2 to (sub)type entity T1. Also copies the
-   --  Is_Unsigned_Type flag in the fixed-point and discrete cases,
-   --  and also copies the alignment value from T2 to T1. It does NOT
-   --  copy the RM_Size field, which must be separately set if this
-   --  is required to be copied also.
+   --  Copies the Esize field and Has_Biased_Representation flag from sub(type)
+   --  entity T2 to (sub)type entity T1. Also copies the Is_Unsigned_Type flag
+   --  in the fixed-point and discrete cases, and also copies the alignment
+   --  value from T2 to T1. It does NOT copy the RM_Size field, which must be
+   --  separately set if this is required to be copied also.
 
    function Scope_Is_Transient  return Boolean;
-   --  True if the current scope is transient.
+   --  True if the current scope is transient
 
    function Static_Integer (N : Node_Id) return Uint;
    --  This function analyzes the given expression node and then resolves it
@@ -792,10 +803,10 @@ package Sem_Util is
    --  E1 and E2 refer to different objects
 
    function Subprogram_Access_Level (Subp : Entity_Id) return Uint;
-   --  Return the accessibility level of the view denoted by Subp.
+   --  Return the accessibility level of the view denoted by Subp
 
    procedure Trace_Scope (N : Node_Id; E : Entity_Id; Msg : String);
-   --  Print debugging information on entry to each unit being analyzed.
+   --  Print debugging information on entry to each unit being analyzed
 
    procedure Transfer_Entities (From : Entity_Id; To : Entity_Id);
    --  Move a list of entities from one scope to another, and recompute
@@ -805,14 +816,14 @@ package Sem_Util is
    --  Return the accessibility level of Typ
 
    function Unit_Declaration_Node (Unit_Id : Entity_Id) return Node_Id;
-   --  Unit_Id is the simple name of a program unit, this function returns
-   --  the corresponding xxx_Declaration node for the entity. Also applies
-   --  to the body entities for subprograms, tasks and protected units, in
-   --  which case it returns the subprogram, task or protected body node
-   --  for it. The unit may be a child unit with any number of ancestors.
+   --  Unit_Id is the simple name of a program unit, this function returns the
+   --  corresponding xxx_Declaration node for the entity. Also applies to the
+   --  body entities for subprograms, tasks and protected units, in which case
+   --  it returns the subprogram, task or protected body node for it. The unit
+   --  may be a child unit with any number of ancestors.
 
    function Universal_Interpretation (Opnd : Node_Id) return Entity_Id;
-   --  Yields universal_Integer or Universal_Real if this is a candidate.
+   --  Yields universal_Integer or Universal_Real if this is a candidate
 
    function Within_Init_Proc return Boolean;
    --  Determines if Current_Scope is within an init proc