]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/hppa-tdep.c
* alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c,
[thirdparty/binutils-gdb.git] / gdb / hppa-tdep.c
index 62531a34f11189d8a317a6aa6b5314203189b7be..27f4eb42bd5c03f6778bec3ef51344890388ca22 100644 (file)
@@ -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);
            }
        }