re PR c/65901 (no warning or error for va_arg (ap, void))
authorMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 28 Apr 2015 08:36:50 +0000 (08:36 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 28 Apr 2015 08:36:50 +0000 (08:36 +0000)
commit4e81b788bb6a2f4ecc51965232727d86ca375c94
treee4a78f92a29b33f3fb61d3b79130e6b5b072cc49
parent90dd6e3df86c81bdc1380513c57cce64caf32f72
re PR c/65901 (no warning or error for va_arg (ap, void))

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.

From-SVN: r222515
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr48767.c
gcc/testsuite/gcc.dg/pr65901.c [new file with mode: 0644]