(initialize_reference): Binding temporary to non-const && is fine.
* decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
+ * decl.c (reshape_init_r): { T } is not an aggregate initializer
+ for class T.
+
2009-07-17 Richard Guenther <rguenther@suse.de>
PR c/40401
a CONSTRUCTOR). TYPE is the type of the variable being initialized, D is the
iterator within the CONSTRUCTOR which points to the initializer to process.
FIRST_INITIALIZER_P is true if this is the first initializer of the
- CONSTRUCTOR node. */
+ outermost CONSTRUCTOR node. */
static tree
reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p)
initializer is considered for the initialization of the first
member of the subaggregate. */
if (TREE_CODE (init) != CONSTRUCTOR
+ /* But don't try this for the first initializer, since that would be
+ looking through the outermost braces; A a2 = { a1 }; is not a
+ valid aggregate initialization. */
+ && !first_initializer_p
&& can_convert_arg (type, TREE_TYPE (init), init, LOOKUP_NORMAL))
{
d->cur++;
2009-07-21 Jason Merrill <jason@redhat.com>
+ * g++.dg/init/aggr4.C: New.
+
+2009-07-21 Jason Merrill <jason@redhat.com>
+
Core issue 934
* g++.dg/cpp0x/initlist22.C: New.