re PR c++/27951 (ICE with invalid anonymous union)
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: r114577
This commit is contained in:
parent
02a5eac483
commit
8bdb09cb0b
|
@ -1,3 +1,9 @@
|
||||||
|
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-12 Roger Sayle <roger@eyesopen.com>
|
2006-06-12 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
PR c++/21210
|
PR c++/21210
|
||||||
|
|
|
@ -1109,6 +1109,8 @@ finish_anon_union (tree anon_union_decl)
|
||||||
}
|
}
|
||||||
|
|
||||||
main_decl = build_anon_union_vars (type, anon_union_decl);
|
main_decl = build_anon_union_vars (type, anon_union_decl);
|
||||||
|
if (main_decl == error_mark_node)
|
||||||
|
return;
|
||||||
if (main_decl == NULL_TREE)
|
if (main_decl == NULL_TREE)
|
||||||
{
|
{
|
||||||
warning (0, "anonymous union with no members");
|
warning (0, "anonymous union with no members");
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||||
|
|
||||||
|
PR c++/27951
|
||||||
|
* g++.dg/other/anon4.C: New test.
|
||||||
|
|
||||||
2006-06-12 Roger Sayle <roger@eyesopen.com>
|
2006-06-12 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
PR c++/21210
|
PR c++/21210
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// PR c++/27951
|
||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
void foo()
|
||||||
|
{
|
||||||
|
int i; // { dg-error "previously" }
|
||||||
|
union { int i; }; // { dg-error "redeclaration" }
|
||||||
|
}
|
Loading…
Reference in New Issue