aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-11-30 01:43:37 +0000
committerPer Bothner <per@bothner.com>1995-11-30 01:43:37 +0000
commit940d596798931962895918454d2ca6bd14b83b1b (patch)
tree0b1efd109bb8fe8f038446ea785b2dd91e35ebeb /gdb/hppa-tdep.c
parent * gdbtypes.h (enum type_code): Added TYPE_CODE_TYPEDEF. (diff)
downloadbinutils-gdb-940d596798931962895918454d2ca6bd14b83b1b.tar.gz
binutils-gdb-940d596798931962895918454d2ca6bd14b83b1b.tar.bz2
binutils-gdb-940d596798931962895918454d2ca6bd14b83b1b.zip
* alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c,
findvar.c, hppa-tdep.c, infcmd.c, language.c, printcmd.c, rs6000-tdep.c, symmisc.c, symtab.c: Add check_typedef/CHECK_TYPEDEF as needed.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 62531a34f11..27f4eb42bd5 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1729,27 +1729,28 @@ target_write_pc (v, pid)
alignment required by their fields. */
static int
-hppa_alignof (arg)
- struct type *arg;
+hppa_alignof (type)
+ struct type *type;
{
int max_align, align, i;
- switch (TYPE_CODE (arg))
+ CHECK_TYPEDEf (type);
+ switch (TYPE_CODE (type))
{
case TYPE_CODE_PTR:
case TYPE_CODE_INT:
case TYPE_CODE_FLT:
- return TYPE_LENGTH (arg);
+ return TYPE_LENGTH (type);
case TYPE_CODE_ARRAY:
- return hppa_alignof (TYPE_FIELD_TYPE (arg, 0));
+ return hppa_alignof (TYPE_FIELD_TYPE (type, 0));
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
max_align = 2;
- for (i = 0; i < TYPE_NFIELDS (arg); i++)
+ for (i = 0; i < TYPE_NFIELDS (type); i++)
{
/* Bit fields have no real alignment. */
- if (!TYPE_FIELD_BITPOS (arg, i))
+ if (!TYPE_FIELD_BITPOS (type, i))
{
- align = hppa_alignof (TYPE_FIELD_TYPE (arg, i));
+ align = hppa_alignof (TYPE_FIELD_TYPE (type, i));
max_align = max (max_align, align);
}
}