------- Comment #4 from mikpe at it dot uu dot se 2010-02-10 16:52 ------- (In reply to comment #0) > static void argy (int foo, ...) { > va_list arg; > char **sp; > > va_start(arg, foo); > sp = va_arg(arg,char **); > /* WHAM. */ > *sp = "foo"; > }
You're missing a va_end(arg); here. Without that I'm able to reproduce really weird behaviour in a modified test case. With the va_end, things work. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43020