------- Comment #11 from vincent at vinc17 dot org 2008-06-10 15:21 ------- Here's the testcase (I've never used va_list and so on myself, so I hope it is correct; at least it shows the missing warning problem). With gcc -Wall -std=c99 -Wc++-compat -pedantic -Wextra, I don't get any warning concerning the incompatibility with C++.
#include <stdlib.h> #include <stdarg.h> typedef enum { ELEM = 17 } en_t; void vafoo (int i, va_list ap1) { en_t x; x = va_arg (ap1, en_t); if (x != ELEM) exit (1); } void foo (int i, ...) { va_list ap; va_start (ap, i); vafoo (i, ap); va_end (ap); } int main () { foo (0, ELEM); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36484