2006-11-21 Jakub Jelinek <jakub@redhat.com>
+ PR c++/29570
+ * decl.c (cp_finish_decl): Check for value dependent brace enclosed
+ scalar initializer.
+
PR c++/29734
* cp-tree.h (WANT_VECTOR): Define.
(WANT_ARITH): Add WANT_VECTOR.
|| !DECL_CLASS_SCOPE_P (decl)
|| !DECL_INTEGRAL_CONSTANT_VAR_P (decl)
|| type_dependent_p
- || value_dependent_expression_p (init))
+ || value_dependent_expression_p (init)
+ /* Check also if initializer is a value dependent
+ { integral_constant_expression }. */
+ || (TREE_CODE (init) == CONSTRUCTOR
+ && VEC_length (constructor_elt, CONSTRUCTOR_ELTS (init)) == 1
+ && value_dependent_expression_p
+ (VEC_index (constructor_elt,
+ CONSTRUCTOR_ELTS (init), 0)->value)))
{
if (init)
DECL_INITIAL (decl) = init;