2000-07-20 Michael Snyder <msnyder@cleaver.cygnus.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 21 Jul 2000 20:03:08 +0000 (20:03 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 21 Jul 2000 20:03:08 +0000 (20:03 +0000)
      * valarith.c (value_sub): Call check_typedef.

gdb/ChangeLog
gdb/valarith.c

index c2cd85f375f8ca49d85dbedfc971987f21a7744e..1bb70e9f0a8f354b1c3d854467dc685d02471985 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-20  Michael Snyder  <msnyder@cleaver.cygnus.com>
+
+       * valarith.c (value_sub): Call check_typedef.
+
 2000-07-19  Nicholas Duffek  <nsd@redhat.com>
 
        * thread.c (free_thread): New function.
index 2db71fdc938eada75ceb609e09e23a42730d36fb..922bdcc214078826b629c0d7e67d5af7bac7675e 100644 (file)
@@ -110,8 +110,8 @@ value_sub (arg1, arg2)
                                      - (sz * value_as_long (arg2))));
        }
       else if (TYPE_CODE (type2) == TYPE_CODE_PTR
-              && TYPE_LENGTH (TYPE_TARGET_TYPE (type1))
-              == TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
+              && TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)))
+              == TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type2))))
        {
          /* pointer to <type x> - pointer to <type x>.  */
          LONGEST sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));