for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
{
tree next;
- tree type;
if (TREE_CODE (field) != FIELD_DECL
|| (DECL_ARTIFICIAL (field)
continue;
/* If this is a bitfield, first convert to the declared type. */
- type = TREE_TYPE (field);
+ tree fldtype = TREE_TYPE (field);
if (DECL_BIT_FIELD_TYPE (field))
- type = DECL_BIT_FIELD_TYPE (field);
- if (type == error_mark_node)
+ fldtype = DECL_BIT_FIELD_TYPE (field);
+ if (fldtype == error_mark_node)
return PICFLAG_ERRONEOUS;
next = NULL_TREE;
|| identifier_p (ce->index));
if (ce->index == field || ce->index == DECL_NAME (field))
next = ce->value;
- else if (ANON_AGGR_TYPE_P (type)
- && search_anon_aggr (type,
+ else if (ANON_AGGR_TYPE_P (fldtype)
+ && search_anon_aggr (fldtype,
TREE_CODE (ce->index) == FIELD_DECL
? DECL_NAME (ce->index)
: ce->index))
if (ce)
{
gcc_assert (ce->value);
- next = massage_init_elt (type, next, nested, flags, complain);
+ next = massage_init_elt (fldtype, next, nested, flags, complain);
++idx;
}
}
&& find_placeholders (next))
CONSTRUCTOR_PLACEHOLDER_BOUNDARY (init) = 1;
}
- else if (type_build_ctor_call (TREE_TYPE (field)))
+ else if (type_build_ctor_call (fldtype))
{
/* If this type needs constructors run for
default-initialization, we can't rely on the back end to do it
for us, so build up TARGET_EXPRs. If the type in question is
a class, just build one up; if it's an array, recurse. */
next = build_constructor (init_list_type_node, NULL);
- next = massage_init_elt (TREE_TYPE (field), next, nested, flags,
- complain);
+ next = massage_init_elt (fldtype, next, nested, flags, complain);
/* Warn when some struct elements are implicitly initialized. */
if ((complain & tf_warning)
}
else
{
- const_tree fldtype = TREE_TYPE (field);
if (TYPE_REF_P (fldtype))
{
if (complain & tf_error)
if (!zero_init_p (fldtype)
|| skipped < 0)
- next = build_zero_init (TREE_TYPE (field), /*nelts=*/NULL_TREE,
+ next = build_zero_init (fldtype, /*nelts=*/NULL_TREE,
/*static_storage_p=*/false);
else
{
continue;
/* If this is a bitfield, now convert to the lowered type. */
- if (type != TREE_TYPE (field))
+ if (fldtype != TREE_TYPE (field))
next = cp_convert_and_check (TREE_TYPE (field), next, complain);
picflags |= picflag_from_initializer (next);
CONSTRUCTOR_APPEND_ELT (v, field, next);