]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix cast types for opencl
authorHannes Domani <ssbssa@yahoo.de>
Tue, 11 Jun 2024 19:30:45 +0000 (21:30 +0200)
committerHannes Domani <ssbssa@yahoo.de>
Tue, 11 Jun 2024 19:30:45 +0000 (21:30 +0200)
commit7eceaa69efddc3bfecfeab1179a580309c5a646e
tree1b2978e9c12e48b029d2b3e2f9cef6735d6a7006
parent3dd8c680a8651aa22c996b1e2d39dd123f204be3
Fix cast types for opencl

The bitshift tests for opencl have these failures:

print /x (signed char) 0x0f << 8
No type named signed char.
(gdb) FAIL: gdb.base/bitshift.exp: lang=opencl: 8-bit, promoted: print /x (signed char) 0x0f << 8
print (signed char) 0x0f << 8
No type named signed char.
(gdb) FAIL: gdb.base/bitshift.exp: lang=opencl: 8-bit, promoted: print (signed char) 0x0f << 8

Apparently opencl doesn't have the 'signed' modifier for types, only
the 'unsigned' modifier.
Even 'char' is guaranteed to be signed if no modifier is used, so
this changes the casts to match this logic.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/bitshift.exp