OSDN Git Service

* c-decl.c (grokfield): Allow typedefs for anonymous structs and
[pf3gnuchains/gcc-fork.git] / gcc / ada / tbuild.ads
index 17be627..0b73a53 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, 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- --
@@ -27,6 +27,7 @@
 --  building specific types of tree nodes.
 
 with Namet; use Namet;
+with Sinfo; use Sinfo;
 with Types; use Types;
 
 package Tbuild is
@@ -57,7 +58,7 @@ package Tbuild is
    pragma Inline (Discard_List);
    --  This is a dummy procedure that simply returns and does nothing. It is
    --  used when a function returning a Node_Id value is called for its side
-   --  effect (e.g. a call to the pareser to parse a list of compilation
+   --  effect (e.g. a call to the parser to parse a list of compilation
    --  units), but the List_Id value is not required.
 
    function Make_Byte_Aligned_Attribute_Reference
@@ -82,8 +83,9 @@ package Tbuild is
    pragma Inline (Make_Implicit_Exception_Handler);
    --  This is just like Make_Exception_Handler, except that it also sets the
    --  Local_Raise_Statements field to No_Elist, ensuring that it is properly
-   --  initialized. This should always be used when creating exception handlers
-   --  as part of the expansion.
+   --  initialized. This should always be used when creating implicit exception
+   --  handlers during expansion (i.e. handlers that do not correspond to user
+   --  source program exception handlers).
 
    function Make_Implicit_If_Statement
      (Node            : Node_Id;
@@ -103,7 +105,7 @@ package Tbuild is
      (Loc                 : Source_Ptr;
       Defining_Identifier : Node_Id;
       Label_Construct     : Node_Id) return Node_Id;
-   --  Used to contruct an implicit label declaration node, including setting
+   --  Used to construct an implicit label declaration node, including setting
    --  the proper Label_Construct field (since Label_Construct is a semantic
    --  field, the normal call to Make_Implicit_Label_Declaration does not
    --  set this field).
@@ -174,6 +176,15 @@ package Tbuild is
    --  A convenient form of Make_String_Literal, where the string value
    --  is given as a normal string instead of a String_Id value.
 
+   function Make_Temporary
+     (Loc          : Source_Ptr;
+      Id           : Character;
+      Related_Node : Node_Id := Empty) return Node_Id;
+   --  Create a defining identifier to capture the value of an expression
+   --  or aggregate, and link it to the expression that it replaces, in
+   --  order to provide better CodePeer reports. The defining identifier
+   --  name is obtained by Make_Internal_Name (Id).
+
    function Make_Unsuppress_Block
      (Loc   : Source_Ptr;
       Check : Name_Id;
@@ -186,6 +197,12 @@ package Tbuild is
    --  "raise Constraint_Error" and returns the root of this tree,
    --  the N_Raise_Statement node.
 
+   function New_Op_Node
+     (New_Node_Kind : Node_Kind;
+      New_Sloc      : Source_Ptr) return Node_Id;
+   --  Create node using New_Node and, if its kind is in N_Op, set its Chars
+   --  field accordingly.
+
    function New_External_Name
      (Related_Id   : Name_Id;
       Suffix       : Character := ' ';
@@ -202,11 +219,11 @@ package Tbuild is
    --
    --  Prefix is prepended only if Prefix is non-blank (in which case it
    --  must be an upper case letter other than O,Q,U,W (which are used for
-   --  identifier encoding, see Namet), and T is reserved for use by implicit
-   --  types. and X is reserved for use by debug type encoding (see package
-   --  Exp_Dbug). Note: the reason that Prefix is last is that it is almost
-   --  always omitted. The notable case of Prefix being non-null is when
-   --  it is 'T' for an implicit type.
+   --  identifier encoding, see Namet), or an underscore, and T is reserved for
+   --  use by implicit types, and X is reserved for use by debug type encoding
+   --  (see package Exp_Dbug). Note: the reason that Prefix is last is that it
+   --  is almost always omitted. The notable case of Prefix being non-null is
+   --  when it is 'T' for an implicit type.
 
    --  Suffix_Index'Image is appended only if the value of Suffix_Index is
    --  positive, or if Suffix_Index is negative 1, then a unique serialized
@@ -214,7 +231,7 @@ package Tbuild is
 
    --  Suffix is also a single upper case letter other than O,Q,U,W,X and is a
    --  required parameter (T is permitted). The constructed name is stored
-   --  using Find_Name so that it can be located using a subsequent Find_Name
+   --  using Name_Find so that it can be located using a subsequent Name_Find
    --  operation (i.e. it is properly hashed into the names table). The upper
    --  case letter given as the Suffix argument ensures that the name does
    --  not clash with any Ada identifier name. These generated names are
@@ -228,7 +245,7 @@ package Tbuild is
    --    Suffix & Suffix_Index'Image
    --  where Suffix is a single upper case letter other than O,Q,U,W,X and is
    --  a required parameter (T is permitted). The constructed name is stored
-   --  using Find_Name so that it can be located using a subsequent Find_Name
+   --  using Name_Find so that it can be located using a subsequent Name_Find
    --  operation (i.e. it is properly hashed into the names table). The upper
    --  case letter given as the Suffix argument ensures that the name does
    --  not clash with any Ada identifier name. These generated names are
@@ -255,12 +272,11 @@ package Tbuild is
    function New_Occurrence_Of
      (Def_Id : Entity_Id;
       Loc    : Source_Ptr) return Node_Id;
-   --  New_Occurrence_Of creates an N_Identifier node which is an
-   --  occurrence of the defining identifier which is passed as its
-   --  argument. The Entity and Etype of the result are set from
-   --  the given defining identifier as follows: Entity is simply
-   --  a copy of Def_Id. Etype is a copy of Def_Id for types, and
-   --  a copy of the Etype of Def_Id for other entities.
+   --  New_Occurrence_Of creates an N_Identifier node which is an occurrence
+   --  of the defining identifier which is passed as its argument. The Entity
+   --  and Etype of the result are set from the given defining identifier as
+   --  follows: Entity is simply a copy of Def_Id. Etype is a copy of Def_Id
+   --  for types, and a copy of the Etype of Def_Id for other entities.
 
    function New_Reference_To
      (Def_Id : Entity_Id;