OSDN Git Service

PR c++/18681
[pf3gnuchains/gcc-fork.git] / gcc / cp / cp-tree.def
index aa0ea83..55ef21e 100644 (file)
@@ -1,7 +1,7 @@
 /* This file contains the definitions and documentation for the
    additional tree codes used in the GNU C++ compiler (see tree.def
    for the standard codes).
-   Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998, 2003, 2004, 2005, 
+   Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998, 2003, 2004, 2005,
    1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    Hacked by Michael Tiemann (tiemann@cygnus.com)
 
@@ -19,10 +19,10 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
+
 
 /* An OFFSET_REF is used in two situations:
 
    1. An expression of the form `A::m' where `A' is a class and `m' is
@@ -33,7 +33,7 @@ Boston, MA 02111-1307, USA.  */
       The expression is a pointer-to-member if its address is taken,
       but simply denotes a member of the object if its address is not
       taken.
-      
+
       This form is only used during the parsing phase; once semantic
       analysis has taken place they are eliminated.
 
@@ -87,17 +87,13 @@ DEFTREECODE (THROW_EXPR, "throw_expr", tcc_expression, 1)
    these to avoid actually creating instances of the empty classes.  */
 DEFTREECODE (EMPTY_CLASS_EXPR, "empty_class_expr", tcc_expression, 0)
 
-/* A DECL which is really just a placeholder for an expression.  Used to
-   implement non-class scope anonymous unions.  */
-DEFTREECODE (ALIAS_DECL, "alias_decl", tcc_declaration, 0)
-
 /* A reference to a member function or member functions from a base
    class.  BASELINK_FUNCTIONS gives the FUNCTION_DECL,
    TEMPLATE_DECL, OVERLOAD, or TEMPLATE_ID_EXPR corresponding to the
    functions.  BASELINK_BINFO gives the base from which the functions
    come, i.e., the base to which the `this' pointer must be converted
    before the functions are called.  BASELINK_ACCESS_BINFO gives the
-   base used to name the functions.  
+   base used to name the functions.
 
    A BASELINK is an expression; the TREE_TYPE of the BASELINK gives
    the type of the expression.  This type is either a FUNCTION_TYPE,
@@ -108,17 +104,17 @@ DEFTREECODE (BASELINK, "baselink", tcc_exceptional, 0)
 /* Template definition.  The following fields have the specified uses,
    although there are other macros in cp-tree.h that should be used for
    accessing this data.
-        DECL_ARGUMENTS          template parm vector
-        DECL_TEMPLATE_INFO      template text &c
+       DECL_ARGUMENTS          template parm vector
+       DECL_TEMPLATE_INFO      template text &c
        DECL_VINDEX             list of instantiations already produced;
                                only done for functions so far
    For class template:
-        DECL_INITIAL            associated templates (methods &c)
-        DECL_TEMPLATE_RESULT    null
+       DECL_INITIAL            associated templates (methods &c)
+       DECL_TEMPLATE_RESULT    null
    For non-class templates:
        TREE_TYPE               type of object to be constructed
-        DECL_TEMPLATE_RESULT    decl for object to be created
-                                (e.g., FUNCTION_DECL with tmpl parms used)
+       DECL_TEMPLATE_RESULT    decl for object to be created
+                               (e.g., FUNCTION_DECL with tmpl parms used)
  */
 DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0)
 
@@ -127,14 +123,14 @@ DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0)
    gives the level (from 1) of the parameter.
 
    Here's an example:
-   
+
    template <class T> // Index 0, Level 1.
    struct S
    {
       template <class U, // Index 0, Level 2.
-                class V> // Index 1, Level 2.
+               class V> // Index 1, Level 2.
       void f();
-   };  
+   };
 
    The DESCENDANTS will be a chain of TEMPLATE_PARM_INDEXs descended
    from this one.  The first descendant will have the same IDX, but
@@ -148,20 +144,20 @@ DEFTREECODE (TEMPLATE_DECL, "template_decl", tcc_declaration, 0)
    struct S<int>
    {
      template <class U, // Index 0, Level 1, Orig Level 2
-               class V> // Index 1, Level 1, Orig Level 2
+              class V> // Index 1, Level 1, Orig Level 2
      void f();
    };
-  
+
    The LEVEL is the level of the parameter when we are worrying about
    the types of things; the ORIG_LEVEL is the level when we are
    worrying about instantiating things.  */
 DEFTREECODE (TEMPLATE_PARM_INDEX, "template_parm_index", tcc_exceptional, 0)
 
 /* Index into a template parameter list for template template parameters.
-   This parameter must be a type.  The TYPE_FIELDS value will be a 
+   This parameter must be a type.  The TYPE_FIELDS value will be a
    TEMPLATE_PARM_INDEX.
 
-   It is used without template arguments like TT in C<TT>, 
+   It is used without template arguments like TT in C<TT>,
    TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO is NULL_TREE
    and TYPE_NAME is a TEMPLATE_DECL.  */
 DEFTREECODE (TEMPLATE_TEMPLATE_PARM, "template_template_parm", tcc_type, 0)
@@ -170,9 +166,9 @@ DEFTREECODE (TEMPLATE_TEMPLATE_PARM, "template_template_parm", tcc_type, 0)
    macros in tree.h.  Changing the order will degrade the speed of the
    compiler.  TEMPLATE_TYPE_PARM, TYPENAME_TYPE, TYPEOF_TYPE,
    BOUND_TEMPLATE_TEMPLATE_PARM.  */
-     
+
 /* Index into a template parameter list.  This parameter must be a type.
-   The type.value field will be a TEMPLATE_PARM_INDEX.  */
+   The type.values field will be a TEMPLATE_PARM_INDEX.  */
 DEFTREECODE (TEMPLATE_TYPE_PARM, "template_type_parm", tcc_type, 0)
 
 /* A type designated by `typename T::t'.  TYPE_CONTEXT is `T',
@@ -185,7 +181,7 @@ DEFTREECODE (TYPENAME_TYPE, "typename_type", tcc_type, 0)
    expression in question.  */
 DEFTREECODE (TYPEOF_TYPE, "typeof_type", tcc_type, 0)
 
-/* Like TEMPLATE_TEMPLATE_PARM it is used with bound template arguments 
+/* Like TEMPLATE_TEMPLATE_PARM it is used with bound template arguments
    like TT<int>.
    In this case, TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO contains the
    template name and its bound arguments.  TYPE_NAME is a TYPE_DECL.  */
@@ -197,13 +193,13 @@ DEFTREECODE (BOUND_TEMPLATE_TEMPLATE_PARM, "bound_template_template_parm",
    TYPE_NAME is an IDENTIFIER_NODE for `C', the member class template.  */
 DEFTREECODE (UNBOUND_CLASS_TEMPLATE, "unbound_class_template", tcc_type, 0)
 
-/* A using declaration.  DECL_INITIAL contains the specified scope.  
-   This is not an alias, but is later expanded into multiple aliases.
-   The decl will have a NULL_TYPE iff the scope is a dependent scope,
-   otherwise it will have a void type.  */
+/* A using declaration.  USING_DECL_SCOPE contains the specified
+   scope.  In a member using decl, unless DECL_DEPENDENT_P is true,
+   USING_DECL_DECLS contains the _DECL or OVERLOAD so named.  This is
+   not an alias, but is later expanded into multiple aliases.  */
 DEFTREECODE (USING_DECL, "using_decl", tcc_declaration, 0)
 
-/* A using directive. The operand is USING_STMT_NAMESPACE.  */     
+/* A using directive. The operand is USING_STMT_NAMESPACE.  */
 DEFTREECODE (USING_STMT, "using_directive", tcc_statement, 1)
 
 /* An un-parsed default argument.  Holds a vector of input tokens and
@@ -218,7 +214,7 @@ DEFTREECODE (DEFAULT_ARG, "default_arg", tcc_exceptional, 0)
    member template, the template may be an IDENTIFIER_NODE.  */
 DEFTREECODE (TEMPLATE_ID_EXPR, "template_id_expr", tcc_expression, 2)
 
-/* A list-like node for chaining overloading candidates. TREE_TYPE is 
+/* A list-like node for chaining overloading candidates. TREE_TYPE is
    the original name, and the parameter is the FUNCTION_DECL.  */
 DEFTREECODE (OVERLOAD, "overload", tcc_exceptional, 0)
 
@@ -226,12 +222,12 @@ DEFTREECODE (OVERLOAD, "overload", tcc_exceptional, 0)
    "OBJECT.SCOPE::~DESTRUCTOR.  The first operand is the OBJECT.  The
    second operand (if non-NULL) is the SCOPE.  The third operand is
    the TYPE node corresponding to the DESTRUCTOR.  The type of the
-   first operand will always be a scalar type. 
+   first operand will always be a scalar type.
 
    The type of a PSEUDO_DTOR_EXPR is always "void", even though it can
    be used as if it were a zero-argument function.  We handle the
    function-call case specially, and giving it "void" type prevents it
-   being used in expressions in ways that are not permitted.  */  
+   being used in expressions in ways that are not permitted.  */
 DEFTREECODE (PSEUDO_DTOR_EXPR, "pseudo_dtor_expr", tcc_expression, 3)
 
 /* A whole bunch of tree codes for the initial, superficial parsing of
@@ -281,7 +277,7 @@ DEFTREECODE (CLEANUP_STMT, "cleanup_stmt", tcc_statement, 3)
 
 /* Represents an 'if' statement. The operands are IF_COND,
    THEN_CLAUSE, and ELSE_CLAUSE, respectively.  */
-/* ??? It is currently still necessary to distinguish between IF_STMT 
+/* ??? It is currently still necessary to distinguish between IF_STMT
    and COND_EXPR for the benefit of templates.  */
 DEFTREECODE (IF_STMT, "if_stmt", tcc_statement, 3)
 
@@ -328,14 +324,14 @@ DEFTREECODE (TINST_LEVEL, "TINST_LEVEL", tcc_exceptional, 0)
 DEFTREECODE (OFFSETOF_EXPR, "offsetof_expr", tcc_expression, 1)
 
 /* Represents a 'sizeof' expression during template expansion.  */
-DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", tcc_unary, 1)
+DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", tcc_expression, 1)
 
 /* Represents the -> operator during template expansion.  */
 DEFTREECODE (ARROW_EXPR, "arrow_expr", tcc_expression, 1)
 
 /* Represents an '__alignof__' expression during template
    expansion.  */
-DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", tcc_unary, 1)
+DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", tcc_expression, 1)
 
 /* A STMT_EXPR represents a statement-expression during template
    expansion.  This is the GCC extension { ( ... ) }.  The