return t;
}
-/* Clean CONSTRUCTOR_NO_IMPLICIT_ZERO from CTOR and its sub-aggregates. */
+/* Clean CONSTRUCTOR_NO_CLEARING from CTOR and its sub-aggregates. */
static void
clear_no_implicit_zero (tree ctor)
{
- if (CONSTRUCTOR_NO_IMPLICIT_ZERO (ctor))
+ if (CONSTRUCTOR_NO_CLEARING (ctor))
{
- CONSTRUCTOR_NO_IMPLICIT_ZERO (ctor) = false;
+ CONSTRUCTOR_NO_CLEARING (ctor) = false;
tree elt; unsigned HOST_WIDE_INT idx;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), idx, elt)
if (TREE_CODE (elt) == CONSTRUCTOR)
If we don't already have one in CTX, use the AGGR_INIT_EXPR_SLOT. */
new_ctx.object = AGGR_INIT_EXPR_SLOT (t);
tree ctor = new_ctx.ctor = build_constructor (DECL_CONTEXT (fun), NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (ctor) = true;
+ CONSTRUCTOR_NO_CLEARING (ctor) = true;
ctx->values->put (new_ctx.object, ctor);
ctx = &new_ctx;
}
case CONSTRUCTOR:
/* And we need to handle PTRMEM_CST wrapped in a CONSTRUCTOR. */
tree idx, val, field; unsigned HOST_WIDE_INT i;
- if (CONSTRUCTOR_NO_IMPLICIT_ZERO (t))
+ if (CONSTRUCTOR_NO_CLEARING (t))
{
if (TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE)
/* An initialized vector would have a VECTOR_CST. */
}
if (field)
return false;
- else if (CONSTRUCTOR_NO_IMPLICIT_ZERO (t))
+ else if (CONSTRUCTOR_NO_CLEARING (t))
/* All the fields are initialized. */
- CONSTRUCTOR_NO_IMPLICIT_ZERO (t) = false;
+ CONSTRUCTOR_NO_CLEARING (t) = false;
return true;
default:
/* Not found. */
if (TREE_CODE (ary) == CONSTRUCTOR
- && CONSTRUCTOR_NO_IMPLICIT_ZERO (ary))
+ && CONSTRUCTOR_NO_CLEARING (ary))
{
/* 'ary' is part of the aggregate initializer we're currently
building; if there's no initializer for this element yet,
gcc_assert (DECL_CONTEXT (part) == TYPE_MAIN_VARIANT (TREE_TYPE (whole)));
- if (CONSTRUCTOR_NO_IMPLICIT_ZERO (whole))
+ if (CONSTRUCTOR_NO_CLEARING (whole))
{
/* 'whole' is part of the aggregate initializer we're currently
building; if there's no initializer for this member yet, that's an
if (ctx->object)
new_ctx.object = build_ctor_subob_ref (index, type, ctx->object);
tree elt = build_constructor (type, NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (elt) = true;
+ CONSTRUCTOR_NO_CLEARING (elt) = true;
new_ctx.ctor = elt;
if (TREE_CODE (value) == TARGET_EXPR)
t = ctx->ctor;
/* We're done building this CONSTRUCTOR, so now we can interpret an
element without an explicit initializer as value-initialized. */
- CONSTRUCTOR_NO_IMPLICIT_ZERO (t) = false;
+ CONSTRUCTOR_NO_CLEARING (t) = false;
TREE_CONSTANT (t) = constant_p;
TREE_SIDE_EFFECTS (t) = side_effects_p;
if (VECTOR_TYPE_P (type))
if (!*non_constant_p)
{
init = ctx->ctor;
- CONSTRUCTOR_NO_IMPLICIT_ZERO (init) = false;
+ CONSTRUCTOR_NO_CLEARING (init) = false;
}
return init;
}
if (*valp == NULL_TREE)
{
*valp = build_constructor (type, NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (*valp) = no_zero_init;
+ CONSTRUCTOR_NO_CLEARING (*valp) = no_zero_init;
}
else if (TREE_CODE (*valp) == STRING_CST)
{
/* If the value of object is already zero-initialized, any new ctors for
subobjects will also be zero-initialized. */
- no_zero_init = CONSTRUCTOR_NO_IMPLICIT_ZERO (*valp);
+ no_zero_init = CONSTRUCTOR_NO_CLEARING (*valp);
vec_safe_push (ctors, *valp);
if (*valp == NULL_TREE)
{
*valp = build_constructor (type, NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (*valp) = no_zero_init;
+ CONSTRUCTOR_NO_CLEARING (*valp) = no_zero_init;
}
else if (TREE_CODE (*valp) == PTRMEM_CST)
*valp = cplus_expand_constant (*valp);
CONSTRUCTOR_ELTS (*valp) = CONSTRUCTOR_ELTS (init);
TREE_CONSTANT (*valp) = TREE_CONSTANT (init);
TREE_SIDE_EFFECTS (*valp) = TREE_SIDE_EFFECTS (init);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (*valp)
- = CONSTRUCTOR_NO_IMPLICIT_ZERO (init);
+ CONSTRUCTOR_NO_CLEARING (*valp)
+ = CONSTRUCTOR_NO_CLEARING (init);
}
else
*valp = init;
new_ctx = *ctx;
new_ctx.object = r;
new_ctx.ctor = build_constructor (TREE_TYPE (r), NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (new_ctx.ctor) = true;
+ CONSTRUCTOR_NO_CLEARING (new_ctx.ctor) = true;
new_ctx.values->put (r, new_ctx.ctor);
ctx = &new_ctx;
}
strips the TARGET_EXPR before we get here. */
new_ctx = *ctx;
new_ctx.ctor = build_constructor (TREE_TYPE (t), NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (new_ctx.ctor) = true;
+ CONSTRUCTOR_NO_CLEARING (new_ctx.ctor) = true;
new_ctx.object = TARGET_EXPR_SLOT (t);
ctx->values->put (new_ctx.object, new_ctx.ctor);
ctx = &new_ctx;
for C++11 constexpr constructors that refer to the object being
initialized. */
ctx.ctor = build_constructor (type, NULL);
- CONSTRUCTOR_NO_IMPLICIT_ZERO (ctx.ctor) = true;
+ CONSTRUCTOR_NO_CLEARING (ctx.ctor) = true;
if (!object)
{
if (TREE_CODE (t) == TARGET_EXPR)
}
if (TREE_CODE (r) == CONSTRUCTOR
- && CONSTRUCTOR_NO_IMPLICIT_ZERO (r))
+ && CONSTRUCTOR_NO_CLEARING (r))
{
if (!allow_non_constant)
error ("%qE is not a constant expression because it refers to "