PR c++/58510
cp/
* init.c (sort_mem_initializers): Splice when giving an error.
testsuite/
* g++.dg/cpp0x/pr58510.C: New test.
From-SVN: r203165
+2013-10-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58510
+ * init.c (sort_mem_initializers): Splice when giving an error.
+
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58535
else if (TREE_VALUE (*last_p) && !TREE_VALUE (init))
goto splice;
else
- error_at (DECL_SOURCE_LOCATION (current_function_decl),
- "initializations for multiple members of %qT",
- ctx);
+ {
+ error_at (DECL_SOURCE_LOCATION (current_function_decl),
+ "initializations for multiple members of %qT",
+ ctx);
+ goto splice;
+ }
}
last_p = p;
+2013-10-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58510
+ * g++.dg/cpp0x/pr58510.C: New test.
+
2013-10-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/19476
--- /dev/null
+// PR c++/58510
+// { dg-do compile { target c++11 } }
+
+void foo()
+{
+ union
+ { // { dg-error "multiple" }
+ int i = 0;
+ char c = 0;
+ };
+}