From c19916b73ee3c695f168e9ddbe867124d8110caf Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sat, 16 May 1998 20:34:43 +0000 Subject: * Bringing over patches for PR 15870, 15653 from chill/d30v branches. Also, fixed a small third-party sanitize typo in ChangeLog. --- gdb/stabsread.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gdb/stabsread.c') diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 480bb1c..be562e5 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -3433,16 +3433,18 @@ read_one_struct_field (fip, pp, p, type, objfile) Note that forward refs cannot be packed, and treat enums as if they had the width of ints. */ - if (TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_INT - && TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_RANGE - && TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_BOOL - && TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_ENUM) + struct type *field_type = check_typedef (FIELD_TYPE (fip->list->field)); + + if (TYPE_CODE (field_type) != TYPE_CODE_INT + && TYPE_CODE (field_type) != TYPE_CODE_RANGE + && TYPE_CODE (field_type) != TYPE_CODE_BOOL + && TYPE_CODE (field_type) != TYPE_CODE_ENUM) { FIELD_BITSIZE (fip->list->field) = 0; } if ((FIELD_BITSIZE (fip->list->field) - == TARGET_CHAR_BIT * TYPE_LENGTH (FIELD_TYPE (fip->list->field)) - || (TYPE_CODE (FIELD_TYPE (fip->list->field)) == TYPE_CODE_ENUM + == TARGET_CHAR_BIT * TYPE_LENGTH (field_type) + || (TYPE_CODE (field_type) == TYPE_CODE_ENUM && FIELD_BITSIZE (fip->list->field) == TARGET_INT_BIT ) ) && -- cgit v1.1