Henry Kroll wrote:
x86_64 fails to copy the second struct passed to va_arg.
static struct myspace {
short int profile;
} bob = { 42 };
void badfunc(int eek, ...) {
va_list ack;
int validate;
struct myspace george, bill;
va_start(ack, eek);
bill = va_arg(ack, struct myspace);
george = va_arg(ack, struct myspace);
validate = va_arg(ack, int);
[...]
int main(int argc, char **argv) {
badfunc(0, bob, bob, bob.profile);
[...]
This line from tcc's include/stdarg.h might give a hint:
/* XXX: this lacks the support of aggregated types. */ \
I have no idea though how such support would look like.
Btw. on win64 it does not work either. I must have misunderstood
something about the structures part of the calling conventions.
--- grischka
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel