pt.c (tsubst): Check valid_array_size_p.
authorJason Merrill <jason@redhat.com>
Mon, 14 May 2018 14:49:45 +0000 (10:49 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 14 May 2018 14:49:45 +0000 (10:49 -0400)
commit403962eac2c99fc7510fbd4164f0a56fb7a15d0c
treeeea7a98609a76102c16b62cf557dcee6cb9af004
parent3846b8e4b37aabba4c85d14078d041020d363fb8
pt.c (tsubst): Check valid_array_size_p.

* pt.c (tsubst) [ARRAY_TYPE]: Check valid_array_size_p.

(tsubst_copy_and_build) [NEW_EXPR]: Clear in_decl.

gcc/c-family/
* c-common.c (valid_array_size_p): Add complain parameter.
* c-common.h: ...which defaults to true.

From-SVN: r260227
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/init/new38.C
gcc/testsuite/g++.dg/template/array30.C [new file with mode: 0644]