Fix array decay handling in constant expressions.
authorJason Merrill <jason@redhat.com>
Fri, 9 Jun 2017 20:13:44 +0000 (16:13 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 9 Jun 2017 20:13:44 +0000 (16:13 -0400)
commit3d2e25a240c7115c3deaaa9dea856588300dd05b
treed62877692ea79f92fd2ed3df7896feb329728f5f
parent55c5c0ad3c32a5c9e5be4a606b9c9925f5416046
Fix array decay handling in constant expressions.

* parser.c (cp_parser_constant_expression): Check
potential_rvalue_constant_expression after decay_conversion.
* pt.c (convert_nontype_argument): Don't require linkage in C++17.

From-SVN: r249079
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/template/function1.C
gcc/testsuite/g++.dg/template/nontype-array1.C [new file with mode: 0644]