aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-07-21 20:03:08 +0000
committerMichael Snyder <msnyder@vmware.com>2000-07-21 20:03:08 +0000
commit3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9 (patch)
tree024c29fb843ad4073cd487f602332d81499c1e0c /gdb/valarith.c
parent7a3120d9a6092b9029231894f8ba1f7620fc6c87 (diff)
downloadgdb-3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9.zip
gdb-3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9.tar.gz
gdb-3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9.tar.bz2
2000-07-20 Michael Snyder <msnyder@cleaver.cygnus.com>
* valarith.c (value_sub): Call check_typedef.
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r--gdb/valarith.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 2db71fd..922bdcc 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -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)));