diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-21 00:28:30 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-21 00:28:30 +0000 |
commit | 288af9ff5edebfb1f1461d8adb2fd50e064d1c52 (patch) | |
tree | 79e79e7901378ca24afca029f3929fdfbccd7994 /gcc/cp/tree.c | |
parent | 8d1bb552ddab1900137bb31d8927d61302d2413d (diff) | |
download | gcc-288af9ff5edebfb1f1461d8adb2fd50e064d1c52.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 8524f6cff91..d54d46dbb79 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -884,8 +884,8 @@ array_of_runtime_bound_p (tree t) if (!dom) return false; tree max = TYPE_MAX_VALUE (dom); - return (!value_dependent_expression_p (max) - && !TREE_CONSTANT (max)); + return (!potential_rvalue_constant_expression (max) + || (!value_dependent_expression_p (max) && !TREE_CONSTANT (max))); } /* Return a reference type node referring to TO_TYPE. If RVAL is |