cp-tree.def (OFFSETOF_EXPR): New.
[gcc.git] / gcc / cp / cp-tree.def
index d64752068a3cbd2efb9c7fa9d1414bd0f498d4d1..02afea97a50245e9669eeb50e2fe19f5abeef0ff 100644 (file)
@@ -51,8 +51,9 @@ DEFTREECODE (PTRMEM_CST, "ptrmem_cst", 'c', 0)
 
 /* For NEW_EXPR, operand 0 is the placement list.
    Operand 1 is the new-declarator.
-   Operand 2 is the initializer.  */
-DEFTREECODE (NEW_EXPR, "nw_expr", 'e', 3)
+   Operand 2 is the number of elements in the array.
+   Operand 3 is the initializer.  */
+DEFTREECODE (NEW_EXPR, "nw_expr", 'e', 4)
 DEFTREECODE (VEC_NEW_EXPR, "vec_nw_expr", 'e', 3)
 
 /* For DELETE_EXPR, operand 0 is the store to be destroyed.
@@ -103,7 +104,7 @@ DEFTREECODE (ALIAS_DECL, "alias_decl", 'd', 0)
    A BASELINK is an expression; the TREE_TYPE of the BASELINK gives
    the type of the expression.  This type is either a FUNCTION_TYPE,
    METHOD_TYPE, or `unknown_type_node' indicating that the function is
-   overloaded. */
+   overloaded.  */
 DEFTREECODE (BASELINK, "baselink", 'x', 0)
 
 /* Template definition.  The following fields have the specified uses,
@@ -197,10 +198,10 @@ DEFTREECODE (TYPEOF_TYPE, "typeof_type", 't', 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. */
+   otherwise it will have a void type.  */
 DEFTREECODE (USING_DECL, "using_decl", 'd', 0)
 
-/* A using directive. The operand is USING_STMT_NAMESPACE. */     
+/* A using directive. The operand is USING_STMT_NAMESPACE.  */     
 DEFTREECODE (USING_STMT, "using_directive", 'e', 1)
 
 /* An un-parsed default argument.  Looks like an IDENTIFIER_NODE.  */
@@ -237,14 +238,17 @@ DEFTREECODE (PSEUDO_DTOR_EXPR, "pseudo_dtor_expr", 'e', 3)
    that expression if it appeared in a template argument list.  In
    that situation, we create a NON_DEPENDENT_EXPR to take the place of
    the original expression.  The expression is the only operand -- it
-   is only needed for diagnostics.   */
+   is only needed for diagnostics.  */
 DEFTREECODE (NON_DEPENDENT_EXPR, "non_dependent_expr", 'e', 1)
 
 /* CTOR_INITIALIZER is a placeholder in template code for a call to
    setup_vtbl_pointer (and appears in all functions, not just ctors).  */
 DEFTREECODE (CTOR_INITIALIZER, "ctor_initializer", 'e', 1)
+
 DEFTREECODE (TRY_BLOCK, "try_block", 'e', 2)
+
 DEFTREECODE (EH_SPEC_BLOCK, "eh_spec_block", 'e', 2)
+
 /* A HANDLER wraps a catch handler for the HANDLER_TYPE.  If this is
    CATCH_ALL_TYPE, then the handler catches all types.  The declaration of
    the catch variable is in HANDLER_PARMS, and the body block in
@@ -255,8 +259,32 @@ DEFTREECODE (HANDLER, "handler", 'e', 2)
    throw, and must call terminate if it does.  */
 DEFTREECODE (MUST_NOT_THROW_EXPR, "must_not_throw_expr", 'e', 1)
 
+/* A CLEANUP_STMT marks the point at which a declaration is fully
+   constructed.  The CLEANUP_EXPR is run on behalf of CLEANUP_DECL
+   when CLEANUP_BODY completes.  */
+DEFTREECODE (CLEANUP_STMT, "cleanup_stmt", 'e', 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 
+   and COND_EXPR for the benefit of templates.  */
+DEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
+
 DEFTREECODE (TAG_DEFN, "tag_defn", 'e', 0)
 
+/* Template instantiation level node.
+
+   TINST_DECL contains the original DECL node.
+   TINST_LOCATION contains the location where the template is instantiated.
+
+   A stack of template instantiation nodes is kept through the TREE_CHAIN
+   fields of these nodes.  */
+
+DEFTREECODE (TINST_LEVEL, "TINST_LEVEL", 'x', 0)
+
+/* Represents an 'offsetof' expression during template expansion.  */
+DEFTREECODE (OFFSETOF_EXPR, "offsetof_expr", 'e', 1)
+
 /*
 Local variables:
 mode:c