GCC主要数据结构之c_expr
2017-03-18 12:13
204 查看
/* 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;
相关文章推荐
- GCC主要数据结构之cpp_reader
- GCC主要数据结构之tree_node
- GCC主要数据结构之cpp_options
- GCC主要数据结构之c_declspec_word
- GCC主要数据结构之gcov_root
- GCC主要数据结构之c_lang
- GCC主要数据结构之struct gcov_info
- GCC主要数据结构之c_language_kind
- GCC主要数据结构之cpp_string
- GCC主要数据结构之rid
- GCC主要数据结构之cpp_macro_arg
- GCC主要数据结构之c_tree_index
- GCC主要数据结构之cpp_identifier
- GCC主要数据结构之c_common_identifier
- GCC主要数据结构之TTYPE_TABLE
- GCC主要数据结构之infile
- GCC主要数据结构之omp_clause_mask
- GCC主要数据结构之c_language_function
- GCC主要数据结构之spec_list
- GCC主要数据结构之pretty_printer