re PR c++/55149 (capturing VLA in lambda)
authorJason Merrill <jason@redhat.com>
Fri, 21 Jun 2013 00:28:30 +0000 (20:28 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 21 Jun 2013 00:28:30 +0000 (20:28 -0400)
commit593bcbb8e43c07296325e167ba98bdc52ee3c8de
tree79e79e7901378ca24afca029f3929fdfbccd7994
parent8fc95c057c13a936806315026521b505cdbb28c9
re PR c++/55149 (capturing VLA in lambda)

PR c++/55149
* decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
context if we're in C++14 mode.
* tree.c (array_of_runtime_bound_p): Return true for a dependent
bound that is not potentually constant.
* cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
* pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
* semantics.c (build_lambda_object): Don't rvalue a VLA capture.
(build_capture_proxy): Set REFERENCE_VLA_OK.
(vla_capture_type): Make it a proper C++ class.
(add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
initializer.

From-SVN: r200279
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/cpp1y/vla8.C [new file with mode: 0644]