Do not rely on FIELD_LOC_KIND_BITPOS being zero.
* ada-lang.c (ada_template_to_fixed_record_type_1): Replace
TYPE_FIELD_BITPOS used as lvalue by SET_FIELD_BITPOS.
* gdbtypes.c (append_flags_type_flag): Likewise, twice.
* jv-lang.c (java_link_class_type): Likewise, once.
* stabsread.c (read_enum_type): Likewise.
+2012-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Do not rely on FIELD_LOC_KIND_BITPOS being zero.
+ * ada-lang.c (ada_template_to_fixed_record_type_1): Replace
+ TYPE_FIELD_BITPOS used as lvalue by SET_FIELD_BITPOS.
+ * gdbtypes.c (append_flags_type_flag): Likewise, twice.
+ * jv-lang.c (java_link_class_type): Likewise, once.
+ * stabsread.c (read_enum_type): Likewise.
+
2012-04-16 Yao Qi <yao@codesourcery.com>
* common/agent.c (agent_run_command): Add one more parameter `len'.
{
off = align_value (off, field_alignment (type, f))
+ TYPE_FIELD_BITPOS (type, f);
- TYPE_FIELD_BITPOS (rtype, f) = off;
+ SET_FIELD_BITPOS (TYPE_FIELD (rtype, f), off);
TYPE_FIELD_BITSIZE (rtype, f) = 0;
if (ada_is_variant_part (type, f))
if (name)
{
TYPE_FIELD_NAME (type, bitpos) = xstrdup (name);
- TYPE_FIELD_BITPOS (type, bitpos) = bitpos;
+ SET_FIELD_BITPOS (TYPE_FIELD (type, bitpos), bitpos);
}
else
{
/* Don't show this field to the user. */
- TYPE_FIELD_BITPOS (type, bitpos) = -1;
+ SET_FIELD_BITPOS (TYPE_FIELD (type, bitpos), -1);
}
}
if (accflags & 0x0008) /* ACC_STATIC */
SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset);
else
- TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
+ SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
{
TYPE_FIELD_TYPE (type, i) = get_java_object_type (); /* FIXME */
SYMBOL_TYPE (xsym) = type;
TYPE_FIELD_NAME (type, n) = SYMBOL_LINKAGE_NAME (xsym);
- TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
+ SET_FIELD_BITPOS (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
TYPE_FIELD_BITSIZE (type, n) = 0;
}
if (syms == osyms)