* gdbtypes.c (append_composite_type_field): Correct the location of

appended fields.
This commit is contained in:
Pedro Alves 2009-01-09 17:41:53 +00:00
parent 58d4abe16b
commit 87f707814c
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
* gdbtypes.c (append_composite_type_field): Correct the location of
appended fields.
2009-01-09 Pedro Alves <pedro@codesourcery.com>
* defs.h (deprecated_error_hook): Delete declaration.

View file

@ -1856,10 +1856,9 @@ append_composite_type_field (struct type *t, char *name,
{
TYPE_LENGTH (t) = TYPE_LENGTH (t) + TYPE_LENGTH (field);
if (TYPE_NFIELDS (t) > 1)
{
FIELD_BITPOS (f[0]) = (FIELD_BITPOS (f[-1])
+ TYPE_LENGTH (field) * TARGET_CHAR_BIT);
}
+ (TYPE_LENGTH (FIELD_TYPE (f[-1]))
* TARGET_CHAR_BIT));
}
}