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.
This commit is contained in:
Jan Kratochvil 2012-04-17 12:43:20 +00:00
parent da03bf4d5b
commit 945b3a3230
5 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,12 @@
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'.

View File

@ -7445,7 +7445,7 @@ ada_template_to_fixed_record_type_1 (struct type *type,
{
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))

View File

@ -3606,12 +3606,12 @@ append_flags_type_flag (struct type *type, int bitpos, char *name)
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);
}
}

View File

@ -480,7 +480,7 @@ java_link_class_type (struct gdbarch *gdbarch,
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 */

View File

@ -3730,7 +3730,7 @@ read_enum_type (char **pp, struct type *type,
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)