summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/skip.c
diff options
context:
space:
mode:
authorWill Newton <willnewton@sourceware.org>2013-06-18 18:16:16 +0000
committerWill Newton <willnewton@sourceware.org>2013-06-18 18:16:16 +0000
commit6de7c271e1b4daf1e2cb9ed807cf953fb2e15d0d (patch)
tree1af387aef72b9722447e3ec302600c2e0cb3911b /gdb/testsuite/gdb.base/skip.c
parent5bd1ef568c63cbcf6ed99a083eeb18cf940871dd (diff)
testsuite/gdb.base: Make skip test use defined behaviour.
The skip test currently relies on the order of evaluation of arguments which is not defined. Use the comma operator where order is defined instead. gdb/testsuite/ChangeLog: 2013-06-18 Will Newton <will.newton@linaro.org> * gdb.base/skip.c: Use comma to evaluate results of foo() and bar() before passing to baz(). * gdb.base/skip.c: baz() now takes one argument instead of two.
Diffstat (limited to 'gdb/testsuite/gdb.base/skip.c')
-rw-r--r--gdb/testsuite/gdb.base/skip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/skip.c b/gdb/testsuite/gdb.base/skip.c
index 565ba93fcf..1467fe3691 100644
--- a/gdb/testsuite/gdb.base/skip.c
+++ b/gdb/testsuite/gdb.base/skip.c
@@ -1,10 +1,11 @@
int foo();
int bar();
-int baz(int, int);
+int baz(int);
int main()
{
- return baz(foo(), bar());
+ /* Use comma operator to sequence evaluation of bar and foo. */
+ return baz((bar(), foo()));
}
int foo()