Even for varadic functions ?
The standard requires this program to work:
#include <stdio.h>
#include <stdarg.h>
void f(int a, ...) {
va_list ap;
va_start(ap, a);
printf("%d %d\n", a, va_arg(ap, int));
va_end(ap);
}
int main(void) {
unsigned x = 1;
f(x, x);
return 0;
}
The implementation must ensure an int value 1 is read even though an
unsigned int value 1 is passed. However, so long as va_arg can find the
right value in either case, the standard allows an int and an unsigned
int to be passed differently (possibly by passing argument type
information along with argument values). And there's nothing requiring
the same va_arg handling from the *printf functions.