Test va_copy in tcctest.c
This commit is contained in:
parent
45e1ae2896
commit
83f0a7b6f8
1 changed files with 4 additions and 2 deletions
|
|
@ -1786,14 +1786,15 @@ void manyarg_test(void)
|
||||||
|
|
||||||
void vprintf1(const char *fmt, ...)
|
void vprintf1(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap, aq;
|
||||||
const char *p;
|
const char *p;
|
||||||
int c, i;
|
int c, i;
|
||||||
double d;
|
double d;
|
||||||
long long ll;
|
long long ll;
|
||||||
long double ld;
|
long double ld;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(aq, fmt);
|
||||||
|
va_copy(ap, aq);
|
||||||
|
|
||||||
p = fmt;
|
p = fmt;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
@ -1829,6 +1830,7 @@ void vprintf1(const char *fmt, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
the_end:
|
the_end:
|
||||||
|
va_end(aq);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue