<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 16, 2013, at 2:34 AM, David Chisnall <<a href="mailto:David.Chisnall@cl.cam.ac.uk">David.Chisnall@cl.cam.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">The __builtin_va_arg_pack() and __builtin_va_arg_pack_len() builtins are useful in this context and, unlike __builtin_apply(), are possible to implement correctly in the general case. I believe that some GNU system headers use them when they are available, so they are probably worth supporting.<br><br>I'd love to see __builtin_apply() implemented and working properly too, but on most architectures / ABIs it's possible to implement it in such a way that it works except for some corner cases and on others it's impossible to implement correctly at all. Code that uses it is either non-portable or just plain broken currently, and that's not something I'd like to see clang encourage.<br></div></blockquote></div><br><div>I don't think we'd say "no" to a (well implemented) version of this, so long as it is localized and doesn't cause widespread increase in complexity in the compiler. Specifically, I wouldn't want to see an IR change to support it.</div><div><br></div><div>-Chris</div></body></html>