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.
+2015-11-17 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * lib/dwarf.exp (_note): Fix left shift of negative value.
+ * gdb.trace/trace-condition.exp: Likewise.
+
2015-11-13 Yao Qi <yao.qi@linaro.org>
* gdb.base/call-sc.exp (test_scalar_returns): Remove the
test_tracepoints $trace_command "21 * 2 == 42" 10
test_tracepoints $trace_command "21 << 1 == 42" 10
test_tracepoints $trace_command "42 >> 1 == 21" 10
- test_tracepoints $trace_command "-21 << 1 == -42" 10
+ test_tracepoints $trace_command "-(21 << 1) == -42" 10
test_tracepoints $trace_command "-42 >> 1 == -21" 10
test_tracepoints $trace_command "(0xabababab & 0x0000ffff) == 0xabab" 10
test_tracepoints $trace_command "(0xabababab | 0x0000ffff) == 0xababffff" 10
_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
}