1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/* bug-?.c */ #include <testfwk.h> #include <stdarg.h> int i; static inline void f(int x, ...) { va_list v; va_start(v, x); i = va_arg(v, int); va_end(v); } void testBug(void) { f(0, 1); ASSERT(i == 1); }