[cfe-commits] Bug 11709 Fix: va_list on ARM is not following AAPCS 7.1.4

Eli Friedman eli.friedman at gmail.com
Wed Oct 17 18:22:20 PDT 2012


On Wed, Oct 17, 2012 at 6:00 PM, Weiming Zhao <weimingz at codeaurora.org> wrote:
> Hi Eli,
>
> Thanks for your info.
>
> Do you mean, in ActOnVAArg or BuildVAArgExpr, it needs
> InitializationSequence, InitializedEntity if va_list is a record type? (I'm
> not familiar with this)

In C++, yes; it's the same sort of check we would perform if you
called a function like "void f(va_list&);".  (In C, the existing check
is fine.)

A testcase would be to make sure we print a reasonable error message
for the following in C++:

__builtin_va_list a();
int b() {
  return __builtin_va_arg(a(), int);
}

-Eli



More information about the cfe-commits mailing list