Fix gdb.base/savedregs.exp with clang
authorGary Benson <gbenson@redhat.com>
Mon, 13 Jul 2020 15:01:00 +0000 (16:01 +0100)
committerGary Benson <gbenson@redhat.com>
Mon, 13 Jul 2020 15:01:00 +0000 (16:01 +0100)
commitf413dd7439e295849018caa01efa8d783e43f532
tree23126ea5b856a31a98454bf76147385baa115a50
parent915771bb8a8c14fce7af0d45967b955d0adc830b
Fix gdb.base/savedregs.exp with clang

gdb.base/savedregs.exp fails to run with clang, because of:

 gdb compile failed, /gdbtest/src/gdb/testsuite/gdb.base/savedregs.c:36:37:
       warning: operator '<<' has lower precedence than '+'; '+' will be
       evaluated first [-Wshift-op-parentheses]
   return callee (a1 << a2 * a3 / a4 + a6 & a6 % a7 - a8) + done;
                     ~~ ~~~~~~~~~~~~~^~~~
 /gdbtest/build/gdb/testsuite/gdb.base/savedregs.c:36:37: note: place
       parentheses around the '+' expression to silence this warning
   return callee (a1 << a2 * a3 / a4 + a6 & a6 % a7 - a8) + done;
                                     ^
                        (                )
 1 warning generated.

This commit fixes it by adding the suggested parentheses.

gdb/testsuite/ChangeLog:

* gdb.base/savedregs.exp (caller): Use parentheses to
make expected expression evaluation ordering explicit.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/savedregs.c