scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0194-vararg.c (176B)


      1 #include <stdarg.h>
      2 
      3 int
      4 fun(int first, ...)
      5 {
      6 	int c;
      7 
      8 	va_list va;
      9 
     10 	va_start(va, first);
     11 	c = va_arg(va, int);
     12 	va_end(va);
     13 
     14 	return c;
     15 }
     16 
     17 int
     18 main()
     19 {
     20 	return fun(1, 0);
     21 }