repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
vaarg.C
blob
c5a8c804ed2dbd108a94c42743f25764472a3795
1
// { dg-do run }
2
#include <stdarg.h>
3
4
extern "C" void abort();
5
6
template <class T>
7
T* f(T t, ...)
8
{
9
va_list ap;
10
11
va_start(ap, t);
12
T* r = va_arg(ap, T*);
13
va_end(ap);
14
15
return r;
16
}
17
18
19
struct S
20
{
21
};
22
23
int main()
24
{
25
S s;
26
27
if (f(s, &s) != &s)
28
abort();
29
}