OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/28432
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
stdarg1.C
1
// Test stdarg function with anonymous argument
2
// { dg-do run }
3
4
#include <stdarg.h>
5
6
extern "C" void abort (void);
7
8
void baz (va_list list)
9
{
10
if (va_arg (list, long) != 3)
11
abort ();
12
}
13
14
void foo (long p1, long, long p2, ...)
15
{
16
va_list list;
17
va_start (list, p2);
18
baz (list);
19
va_end (list);
20
}
21
22
int main ()
23
{
24
foo (0, 1, 2, (long)3);
25
return 0;
26
}