aboutsummaryrefslogtreecommitdiff
path: root/gdb/selftest-arch.h
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2020-03-31 14:49:06 +0200
committerHannes Domani <ssbssa@yahoo.de>2020-04-01 19:15:03 +0200
commit60e22c1eacb0df32aeeeb78c53cfd46c53a3770f (patch)
treee9870fa9aee3159d44e48cffce61f0d85abf8318 /gdb/selftest-arch.h
parent77bf7b5317195e092a9f18fef993c412e2e05f53 (diff)
downloadgdb-60e22c1eacb0df32aeeeb78c53cfd46c53a3770f.zip
gdb-60e22c1eacb0df32aeeeb78c53cfd46c53a3770f.tar.gz
gdb-60e22c1eacb0df32aeeeb78c53cfd46c53a3770f.tar.bz2
Allow pointer arithmetic with integer references
Considering these variables: int i = 3; int &iref = i; It's not possible to do any pointer arithmetic with iref: (gdb) p &i+iref Argument to arithmetic operation not a number or boolean. So this adds checks for references to integers in pointer arithmetic. gdb/ChangeLog: 2020-04-01 Hannes Domani <ssbssa@yahoo.de> PR gdb/24789 * eval.c (is_integral_or_integral_reference): New function. (evaluate_subexp_standard): Allow integer references in pointer arithmetic. gdb/testsuite/ChangeLog: 2020-04-01 Hannes Domani <ssbssa@yahoo.de> PR gdb/24789 * gdb.cp/misc.cc: Add integer reference variable. * gdb.cp/misc.exp: Add test.
Diffstat (limited to 'gdb/selftest-arch.h')
0 files changed, 0 insertions, 0 deletions