diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2024-06-11 20:36:51 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2024-07-05 21:43:03 +0200 |
commit | 2de28d2f451e378069662d6a65f4129fd939cff9 (patch) | |
tree | 9853a3319570da99196dbaf496c5a008f3a56ddb /gdb/auto-load.h | |
parent | cec2e207d08127bf5458a220f741020aff4148da (diff) | |
download | gdb-2de28d2f451e378069662d6a65f4129fd939cff9.zip gdb-2de28d2f451e378069662d6a65f4129fd939cff9.tar.gz gdb-2de28d2f451e378069662d6a65f4129fd939cff9.tar.bz2 |
Fix 64-bit shifts where long only has 32-bit size
On systems where long has 32-bit size you get these failures:
print 1 << (unsigned long long) 0xffffffffffffffff
Cannot export value 18446744073709551615 as 32-bits unsigned integer (must be between 0 and 4294967295)
(gdb) FAIL: gdb.base/bitshift.exp: lang=c: max-uint64: print 1 << (unsigned long long) 0xffffffffffffffff
print 1 >> (unsigned long long) 0xffffffffffffffff
Cannot export value 18446744073709551615 as 32-bits unsigned integer (must be between 0 and 4294967295)
(gdb) FAIL: gdb.base/bitshift.exp: lang=c: max-uint64: print 1 >> (unsigned long long) 0xffffffffffffffff
print -1 << (unsigned long long) 0xffffffffffffffff
Cannot export value 18446744073709551615 as 32-bits unsigned integer (must be between 0 and 4294967295)
(gdb) FAIL: gdb.base/bitshift.exp: lang=c: max-uint64: print -1 << (unsigned long long) 0xffffffffffffffff
print -1 >> (unsigned long long) 0xffffffffffffffff
Cannot export value 18446744073709551615 as 32-bits unsigned integer (must be between 0 and 4294967295)
(gdb) FAIL: gdb.base/bitshift.exp: lang=c: max-uint64: print -1 >> (unsigned long long) 0xffffffffffffffff
Fixed by changing the number-of-bits variable to ULONGEST.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/auto-load.h')
0 files changed, 0 insertions, 0 deletions