PR c++/27951
* decl2.c (finish_anon_union): Return early if build_anon_union_vars
fails.
* g++.dg/other/anon4.C: New test.
From-SVN: r114579
+2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/27951
+ * decl2.c (finish_anon_union): Return early if build_anon_union_vars
+ fails.
+
2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27601
}
main_decl = build_anon_union_vars (type, anon_union_decl);
+ if (main_decl == error_mark_node)
+ return;
if (main_decl == NULL_TREE)
{
warning ("anonymous union with no members");
+2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/27951
+ * g++.dg/other/anon4.C: New test.
+
2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27601
--- /dev/null
+// PR c++/27951
+// { dg-do compile }
+
+void foo()
+{
+ int i; // { dg-error "previously" }
+ union { int i; }; // { dg-error "redeclaration" }
+}