This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More missing hunks in cp


2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
	* cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
	(DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
	(KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
	(TYPENAME_TYPE_FULLNAME): Add check and use type.values.
	(TYPEOF_TYPE_EXPR): New macro.

*** cp-tree.def	18 Feb 2004 15:05:17 -0000	1.82
--- cp-tree.def	18 Mar 2004 22:39:14 -0000
*************** DEFTREECODE (TEMPLATE_PARM_INDEX, "templ
*** 160,164 ****
  
  /* Index into a template parameter list.  This parameter must be a type.
!    The TYPE_FIELDS value will be a TEMPLATE_PARM_INDEX.  */
  DEFTREECODE (TEMPLATE_TYPE_PARM, "template_type_parm", 't', 0)
  
--- 160,164 ----
  
  /* Index into a template parameter list.  This parameter must be a type.
!    The type.value field will be a TEMPLATE_PARM_INDEX.  */
  DEFTREECODE (TEMPLATE_TYPE_PARM, "template_type_parm", 't', 0)
  
*************** DEFTREECODE (TYPENAME_TYPE, "typename_ty
*** 191,195 ****
  DEFTREECODE (UNBOUND_CLASS_TEMPLATE, "unbound_class_template", 't', 0)
  
! /* A type designated by `__typeof (expr)'.  TYPE_FIELDS is the
     expression in question.  */
  DEFTREECODE (TYPEOF_TYPE, "typeof_type", 't', 0)
--- 191,195 ----
  DEFTREECODE (UNBOUND_CLASS_TEMPLATE, "unbound_class_template", 't', 0)
  
! /* A type designated by `__typeof (expr)'.  TYPEOF_TYPE_EXPR is the
     expression in question.  */
  DEFTREECODE (TYPEOF_TYPE, "typeof_type", 't', 0)
*** cp-tree.h	16 Mar 2004 22:17:57 -0000	1.958
--- cp-tree.h	18 Mar 2004 22:39:18 -0000
*************** struct lang_decl GTY(())
*** 2257,2271 ****
     ->u.f.u.saved_language_function)
  
! #define NEW_EXPR_USE_GLOBAL(NODE)	TREE_LANG_FLAG_0 (NODE)
! #define DELETE_EXPR_USE_GLOBAL(NODE)	TREE_LANG_FLAG_0 (NODE)
! #define DELETE_EXPR_USE_VEC(NODE)	TREE_LANG_FLAG_1 (NODE)
  
  /* Indicates that this is a non-dependent COMPOUND_EXPR which will
     resolve to a function call.  */
! #define COMPOUND_EXPR_OVERLOADED(NODE)	TREE_LANG_FLAG_0 (NODE)
  
  /* In a CALL_EXPR appearing in a template, true if Koenig lookup
     should be performed at instantiation time.  */
! #define KOENIG_LOOKUP_P(NODE) TREE_LANG_FLAG_0(NODE)
  
  /* Nonzero if this AGGR_INIT_EXPR provides for initialization via a
o--- 2257,2275 ----
     ->u.f.u.saved_language_function)
  
! #define NEW_EXPR_USE_GLOBAL(NODE) \
!   TREE_LANG_FLAG_0 (NEW_EXPR_CHECK (NODE))
! #define DELETE_EXPR_USE_GLOBAL(NODE) \
!   TREE_LANG_FLAG_0 (DELETE_EXPR_CHECK (NODE))
! #define DELETE_EXPR_USE_VEC(NODE) \
!   TREE_LANG_FLAG_1 (DELETE_EXPR_CHECK (NODE))
  
  /* Indicates that this is a non-dependent COMPOUND_EXPR which will
     resolve to a function call.  */
! #define COMPOUND_EXPR_OVERLOADED(NODE) \
!   TREE_LANG_FLAG_0 (COMPOUND_EXPR_CHECK (NODE))
  
  /* In a CALL_EXPR appearing in a template, true if Koenig lookup
     should be performed at instantiation time.  */
! #define KOENIG_LOOKUP_P(NODE) TREE_LANG_FLAG_0 (CALL_EXPR_CHECK (NODE))
  
  /* Nonzero if this AGGR_INIT_EXPR provides for initialization via a
*************** struct lang_decl GTY(())
*** 2287,2291 ****
     corresponding TYPE_DECL.  However, this may also be a
     TEMPLATE_ID_EXPR if we had something like `typename X::Y<T>'.  */
! #define TYPENAME_TYPE_FULLNAME(NODE) (TYPE_FIELDS (NODE))
  
  /* Nonzero in INTEGER_CST means that this int is negative by dint of
--- 2291,2295 ----
     corresponding TYPE_DECL.  However, this may also be a
     TEMPLATE_ID_EXPR if we had something like `typename X::Y<T>'.  */
! #define TYPENAME_TYPE_FULLNAME(NODE) (TYPENAME_TYPE_CHECK (NODE))->type.values
  
  /* Nonzero in INTEGER_CST means that this int is negative by dint of
*************** struct lang_decl GTY(())
*** 2491,2495 ****
  /* Indicates when overload resolution may resolve to a pointer to
     member function. [expr.unary.op]/3 */
! #define PTRMEM_OK_P(NODE) TREE_LANG_FLAG_0 (NODE)
  
  /* Get the POINTER_TYPE to the METHOD_TYPE associated with this
--- 2495,2500 ----
  /* Indicates when overload resolution may resolve to a pointer to
     member function. [expr.unary.op]/3 */
! #define PTRMEM_OK_P(NODE) \
!   TREE_LANG_FLAG_0 (TREE_CHECK2 ((NODE), ADDR_EXPR, OFFSET_REF))
  
  /* Get the POINTER_TYPE to the METHOD_TYPE associated with this
*************** struct lang_decl GTY(())
*** 2545,2548 ****
--- 2550,2556 ----
  #define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member)
  
+ /* The expression in question for a TYPEOF_TYPE.  */
+ #define TYPEOF_TYPE_EXPR(NODE) (TYPEOF_TYPE_CHECK (NODE))->type.values
+ 
  /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was
     specified in its declaration.  This can also be set for an
*************** enum overload_flags { NO_SPECIAL = 0, DT
*** 3402,3406 ****
  /* These macros are for accessing the fields of TEMPLATE_TYPE_PARM,
     TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes.  */
! #define TEMPLATE_TYPE_PARM_INDEX(NODE) (TYPE_FIELDS (NODE))
  #define TEMPLATE_TYPE_IDX(NODE) \
    (TEMPLATE_PARM_IDX (TEMPLATE_TYPE_PARM_INDEX (NODE)))
--- 3410,3416 ----
  /* These macros are for accessing the fields of TEMPLATE_TYPE_PARM,
     TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes.  */
! #define TEMPLATE_TYPE_PARM_INDEX(NODE)					 \
!   (TREE_CHECK3 ((NODE), TEMPLATE_TYPE_PARM, TEMPLATE_TEMPLATE_PARM,	\
! 		BOUND_TEMPLATE_TEMPLATE_PARM))->type.values
  #define TEMPLATE_TYPE_IDX(NODE) \
    (TEMPLATE_PARM_IDX (TEMPLATE_TYPE_PARM_INDEX (NODE)))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]