GCC主要数据结构之c_expr

 

/* Record parser information about an expression that is irrelevant    for code generation alongside a tree representing its value.  */ struct c_expr {   /* The value of the expression.  */   tree value;   /* Record the original unary/binary operator of an expression, which may      have been changed by fold, STRING_CST for unparenthesized string      constants, C_MAYBE_CONST_EXPR for __builtin_constant_p calls      (even if parenthesized), for subexpressions, and for non-constant      initializers, or ERROR_MARK for other expressions (including      parenthesized expressions).  */   enum tree_code original_code;   /* If not NULL, the original type of an expression.  This will      differ from the type of the value field for an enum constant.      The type of an enum constant is a plain integer type, but this      field will be the enum type.  */   tree original_type;

  /* The source range of this expression.  This is redundant      for node values that have locations, but not all node kinds      have locations (e.g. constants, and references to params, locals,      etc), so we stash a copy here.  */   source_range src_range;

  /* Access to the first and last locations within the source spelling      of this expression.  */   location_t get_start () const { return src_range.m_start; }   location_t get_finish () const { return src_range.m_finish; }

  /* Set the value to error_mark_node whilst ensuring that src_range      is initialized.  */   void set_error ()   {     value = error_mark_node;     src_range.m_start = UNKNOWN_LOCATION;     src_range.m_finish = UNKNOWN_LOCATION;   } };

/* Type alias for struct c_expr. This allows to use the structure
   inside the VEC types.  */
typedef struct c_expr c_expr_t;
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值