* semantics.c (maybe_constant_value): Check
instantiation_dependent_expression_p.
* pt.c (build_non_dependent_expr): Don't check it here.
From-SVN: r197327
2013-04-01 Jason Merrill <jason@redhat.com>
+ * semantics.c (maybe_constant_value): Check
+ instantiation_dependent_expression_p.
+ * pt.c (build_non_dependent_expr): Don't check it here.
+
PR c++/56772
* init.c (build_new): Don't try to process an array initializer
at template definition time.
#ifdef ENABLE_CHECKING
/* Try to get a constant value for all non-dependent expressions in
order to expose bugs in *_dependent_expression_p and constexpr. */
- if (cxx_dialect >= cxx0x
- && !instantiation_dependent_expression_p (expr))
+ if (cxx_dialect >= cxx0x)
maybe_constant_value (fold_non_dependent_expr_sfinae (expr, tf_none));
#endif
{
tree r;
- if (type_dependent_expression_p (t)
+ if (instantiation_dependent_expression_p (t)
|| type_unknown_p (t)
|| BRACE_ENCLOSED_INITIALIZER_P (t)
- || !potential_constant_expression (t)
- || value_dependent_expression_p (t))
+ || !potential_constant_expression (t))
{
if (TREE_OVERFLOW_P (t))
{