diff options
Diffstat (limited to 'gcc/c-family/c-common.h')
-rw-r--r-- | gcc/c-family/c-common.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 5c545f2950f..afd8f07e72f 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -486,7 +486,7 @@ typedef enum ref_operator { struct GTY(()) stmt_tree_s { /* A stack of statement lists being collected. */ - VEC(tree,gc) *x_cur_stmt_list; + vec<tree, va_gc> *x_cur_stmt_list; /* In C++, Nonzero if we should treat statements as full expressions. In particular, this variable is non-zero if at the @@ -512,20 +512,16 @@ struct GTY(()) c_language_function { /* Vector of locally defined typedefs, for -Wunused-local-typedefs. */ - VEC(tree,gc) *local_typedefs; + vec<tree, va_gc> *local_typedefs; }; #define stmt_list_stack (current_stmt_tree ()->x_cur_stmt_list) /* When building a statement-tree, this is the current statement list - being collected. We define it in this convoluted way, rather than - using VEC_last, because it must be an lvalue. */ + being collected. */ +#define cur_stmt_list (stmt_list_stack->last ()) -#define cur_stmt_list \ - (*(VEC_address (tree, stmt_list_stack) \ - + VEC_length (tree, stmt_list_stack) - 1)) - -#define building_stmt_list_p() (!VEC_empty (tree, stmt_list_stack)) +#define building_stmt_list_p() (stmt_list_stack && !stmt_list_stack->is_empty()) /* Language-specific hooks. */ @@ -759,7 +755,7 @@ extern void constant_expression_warning (tree); extern void constant_expression_error (tree); extern bool strict_aliasing_warning (tree, tree, tree); extern void sizeof_pointer_memaccess_warning (location_t *, tree, - VEC(tree, gc) *, tree *, + vec<tree, va_gc> *, tree *, bool (*) (tree, tree)); extern void warnings_for_convert_and_check (tree, tree, tree); extern tree convert_and_check (tree, tree); @@ -899,10 +895,10 @@ extern void c_do_switch_warnings (splay_tree, location_t, tree, tree); extern tree build_function_call (location_t, tree, tree); -extern tree build_function_call_vec (location_t, tree, - VEC(tree,gc) *, VEC(tree,gc) *); +extern tree build_function_call_vec (location_t, tree, vec<tree, va_gc> *, + vec<tree, va_gc> *); -extern tree resolve_overloaded_builtin (location_t, tree, VEC(tree,gc) *); +extern tree resolve_overloaded_builtin (location_t, tree, vec<tree, va_gc> *); extern tree finish_label_address_expr (tree, location_t); @@ -997,11 +993,11 @@ extern void set_underlying_type (tree); extern void record_locally_defined_typedef (tree); extern void maybe_record_typedef_use (tree); extern void maybe_warn_unused_local_typedefs (void); -extern VEC(tree,gc) *make_tree_vector (void); -extern void release_tree_vector (VEC(tree,gc) *); -extern VEC(tree,gc) *make_tree_vector_single (tree); -extern VEC(tree,gc) *make_tree_vector_from_list (tree); -extern VEC(tree,gc) *make_tree_vector_copy (const VEC(tree,gc) *); +extern vec<tree, va_gc> *make_tree_vector (void); +extern void release_tree_vector (vec<tree, va_gc> *); +extern vec<tree, va_gc> *make_tree_vector_single (tree); +extern vec<tree, va_gc> *make_tree_vector_from_list (tree); +extern vec<tree, va_gc> *make_tree_vector_copy (const vec<tree, va_gc> *); /* In c-gimplify.c */ extern void c_genericize (tree); |