summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-09 22:08:59 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-09 22:08:59 +0000
commitd19a39b10f5144499cbef10cc4634bd1253c0db5 (patch)
tree068030a46a2f439f6d1fd66439255a8987253d4c /gcc/cp/decl.c
parent3f5a5361770c45441bca8408edb4deb71c3a2697 (diff)
downloadgcc-d19a39b10f5144499cbef10cc4634bd1253c0db5.tar.gz
* decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198756 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 438d27de1bd..9c97c9dd1a9 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6402,7 +6402,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
&& TYPE_FOR_JAVA (type) && MAYBE_CLASS_TYPE_P (type))
error ("non-static data member %qD has Java class type", decl);
- if (array_of_runtime_bound_p (type))
+ if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type))
{
/* If the VLA bound is larger than half the address space, or less
than zero, throw std::bad_array_length. */