* decl.c (compute_array_index_type): Don't call
maybe_constant_value for a non-integral expression.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207161
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-01-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/59097
+ * decl.c (compute_array_index_type): Don't call
+ maybe_constant_value for a non-integral expression.
+
2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
abi_1_itype = error_mark_node;
}
- size = maybe_constant_value (size);
+ if (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (type))
+ size = maybe_constant_value (size);
+
if (!TREE_CONSTANT (size))
size = osize;
}
--- /dev/null
+// PR c++/59097
+// { dg-options "" }
+
+void foo()
+{
+ int x[({ return; })]; // { dg-error "non-integral" }
+}