2011-04-20 Jason Merrill <jason@redhat.com>
+ * semantics.c (finish_compound_literal): Don't put an array
+ with a dtor in a static variable.
+
+2011-04-20 Jason Merrill <jason@redhat.com>
+
PR c++/48594
* decl2.c (build_offset_ref_call_from_tree): Move
non-dependency of object outside condition.
represent class temporaries with TARGET_EXPR so we elide copies. */
if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))
&& TREE_CODE (type) == ARRAY_TYPE
+ && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
&& initializer_constant_valid_p (compound_literal, type))
{
tree decl = create_temporary_var (type);
2011-04-20 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/initlist47.C: New.
+
+2011-04-20 Jason Merrill <jason@redhat.com>
+
* g++.dg/template/const4.C: New.
2011-04-19 Jason Merrill <jason@redhat.com>
--- /dev/null
+// { dg-options -std=c++0x }
+
+struct A { ~A() = delete; }; // { dg-error "declared" }
+
+int main()
+{
+ typedef const A cA[2];
+ cA{}; // { dg-error "deleted" }
+}