old-cross-binutils/gdb/testsuite/gdb.base/skip.c
Will Newton 6de7c271e1 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.
2013-06-18 18:16:16 +00:00

14 lines
175 B
C

int foo();
int bar();
int baz(int);
int main()
{
/* Use comma operator to sequence evaluation of bar and foo. */
return baz((bar(), foo()));
}
int foo()
{
return 0;
}