|
From: | grischka |
Subject: | Re: [Tinycc-devel] x86_64: second struct va_arg fails |
Date: | Wed, 15 Dec 2010 03:07:43 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |