diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/bitshift.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/bitshift.exp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/bitshift.exp b/gdb/testsuite/gdb.base/bitshift.exp index cab82e1..dccc36b 100644 --- a/gdb/testsuite/gdb.base/bitshift.exp +++ b/gdb/testsuite/gdb.base/bitshift.exp @@ -123,10 +123,12 @@ proc make_val_cast {lang signed bits val} { return "$val as ${sign_prefix}$bits" } else { # C-like cast. - if {$signed} { + if {!$signed} { + set sign_prefix "unsigned " + } elseif {$lang == "opencl"} { set sign_prefix "" } else { - set sign_prefix "un" + set sign_prefix "signed " } if {$bits == 8} { set type "char" @@ -143,7 +145,7 @@ proc make_val_cast {lang signed bits val} { } else { error "$lang: unsupported bits" } - return "(${sign_prefix}signed $type) $val" + return "(${sign_prefix}$type) $val" } } |