repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
va-arg-11.c
blob
b178b880d4550a43d21c6e8a63ec85961ffcc7ac
1
/* Test va_arg when the result is ignored and only the pointer increment
2
side effect is used. */
3
#include <stdarg.h>
4
5
static int
6
foo
(
int
a
, ...)
7
{
8
va_list
va
;
9
int
i
,
res
;
10
11
va_start
(
va
,
a
);
12
13
for
(
i
=
0
;
i
<
4
; ++
i
)
14
(
void
)
va_arg
(
va
,
int
);
15
16
res
=
va_arg
(
va
,
int
);
17
18
va_end
(
va
);
19
20
return
res
;
21
}
22
23
int
24
main
(
void
)
25
{
26
if
(
foo
(
5
,
4
,
3
,
2
,
1
,
0
))
27
abort
();
28
exit
(
0
);
29
}