extern duration_kind decl_storage_duration (tree);
extern tree cp_walk_subtrees (tree*, int*, walk_tree_fn,
void*, struct pointer_set_t*);
-#define cp_walk_tree(a,b,c,d) \
- walk_tree_1 (a, b, c, d, cp_walk_subtrees)
-#define cp_walk_tree_without_duplicates(a,b,c) \
- walk_tree_without_duplicates_1 (a, b, c, cp_walk_subtrees)
+#define cp_walk_tree(tp,func,data,pset) \
+ walk_tree_1 (tp, func, data, pset, cp_walk_subtrees)
+#define cp_walk_tree_without_duplicates(tp,func,data) \
+ walk_tree_without_duplicates_1 (tp, func, data, cp_walk_subtrees)
extern tree fold_if_not_in_template (tree);
extern tree rvalue (tree);
extern tree convert_bitfield_to_declared_type (tree);
tree
compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
{
- tree type;
tree itype;
tree osize = size;
tree abi_1_itype = NULL_TREE;
if (error_operand_p (size))
return error_mark_node;
- type = TREE_TYPE (size);
- /* type_dependent_expression_p? */
- if (!dependent_type_p (type))
+ if (!type_dependent_expression_p (size))
{
+ tree type = TREE_TYPE (size);
+
mark_rvalue_use (size);
if (cxx_dialect < cxx0x && TREE_CODE (size) == NOP_EXPR
/* We can only call value_dependent_expression_p on integral constant
expressions; treat non-constant expressions as dependent, too. */
if (processing_template_decl
- && (dependent_type_p (type)
+ && (type_dependent_expression_p (size)
|| !TREE_CONSTANT (size) || value_dependent_expression_p (size)))
{
/* We cannot do any checking for a SIZE that isn't known to be