summaryrefslogtreecommitdiff
path: root/gdb/valarith.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2000-07-21 20:03:08 +0000
committerMichael Snyder <msnyder@specifix.com>2000-07-21 20:03:08 +0000
commit40740a97e4df739708bbc9d91f45fc0ab0616342 (patch)
tree432b9e7f1738017f338eda71a47f8a0f3430956f /gdb/valarith.c
parent56864cd1d3dcba0816d742b8183de0c293679c64 (diff)
downloadgdb-40740a97e4df739708bbc9d91f45fc0ab0616342.tar.gz
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 2db71fdc938..922bdcc2140 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)));