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

@ -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);
}
}