diff options
author | Dominik Vogt <vogt@linux.vnet.ibm.com> | 2015-11-17 10:56:32 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-11-17 10:56:32 +0100 |
commit | 340c283058287c3c1307f0a8d44239e802d6c8c5 (patch) | |
tree | 9d17e846d326950c01211c5d1e412f44243cb6f9 /gdb/testsuite/lib | |
parent | 66c6502d7a457057683f56fd6d606fd9b2da0655 (diff) | |
download | gdb-340c283058287c3c1307f0a8d44239e802d6c8c5.zip gdb-340c283058287c3c1307f0a8d44239e802d6c8c5.tar.gz gdb-340c283058287c3c1307f0a8d44239e802d6c8c5.tar.bz2 |
gdb/testsuite: Fix left shift of negative value.
This patch fixes all occurences of left-shifting negative constants in C cod
which is undefined by the C standard.
gdb/testsuite/ChangeLog:
* lib/dwarf.exp (_note): Fix left shift of negative value.
* gdb.trace/trace-condition.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/dwarf.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 9716795..c87da87 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -1289,7 +1289,7 @@ namespace eval Dwarf { _op .ascii [_quote $name] # Alignment. set align 2 - set total [expr {($namelen + (1 << $align) - 1) & (-1 << $align)}] + set total [expr {($namelen + (1 << $align) - 1) & -(1 << $align)}] for {set i $namelen} {$i < $total} {incr i} { _op .byte 0 } |