Make canonical_va_list_type more strict
authorTom de Vries <tom@codesourcery.com>
Sat, 10 Sep 2016 14:38:56 +0000 (14:38 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sat, 10 Sep 2016 14:38:56 +0000 (14:38 +0000)
commit5b28efbbf4abec11f013f4e76f5b55e2974737cf
tree3c42070a9bfa92bf3029b74813fd60d1dd925ccc
parentaf4b8a523322d6100b52d41ad12d7b602d01331b
Make canonical_va_list_type more strict

2016-09-10  Tom de Vries  <tom@codesourcery.com>

PR C/71602
* builtins.c (std_canonical_va_list_type): Strictly return non-null for
va_list type only.
* config/i386/i386.c (ix86_canonical_va_list_type): Same.
* gimplify.c (gimplify_va_arg_expr): Handle &va_list.

* c-common.c (build_va_arg): Handle more strict
targetm.canonical_va_list_type.  Replace first argument type error with
assert.

* c-c++-common/va-arg-va-list-type.c: New test.

From-SVN: r240072
gcc/ChangeLog
gcc/builtins.c
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/config/i386/i386.c
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/va-arg-va-list-type.c [new file with mode: 0644]