aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.c
diff options
context:
space:
mode:
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)));