On 04/27/2015 11:30 AM, Marek Polacek wrote:
As reported in the PR, va_arg (ap, void) probably doesn't make any sense and
should be rejected thus.  cc1plus and clang reject va_arg with an incomplete
type.  This patch makes cc1 reject it as well.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2015-04-27  Marek Polacek  <pola...@redhat.com>

        PR c/65901
        * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.

        * gcc.c-torture/compile/pr48767.c (foo): Add dg-error.
        * gcc.dg/pr65901.c: New test.
OK.
jeff

Reply via email to