mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 19:01:17 +08:00
re PR c++/19963 (ICE on invalid member declaration)
PR c++/19963 * class.c (layout_class_type): Skip fields with invalid types. * g++.dg/other/incomplete2.C: New test. From-SVN: r113220
This commit is contained in:
parent
c0a3f887e5
commit
4e3bd7d561
@ -1,3 +1,8 @@
|
||||
2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/19963
|
||||
* class.c (layout_class_type): Skip fields with invalid types.
|
||||
|
||||
2006-04-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26912
|
||||
|
@ -4607,6 +4607,8 @@ layout_class_type (tree t, tree *virtuals_p)
|
||||
}
|
||||
|
||||
type = TREE_TYPE (field);
|
||||
if (type == error_mark_node)
|
||||
continue;
|
||||
|
||||
padding = NULL_TREE;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/19963
|
||||
* g++.dg/other/incomplete2.C: New test.
|
||||
|
||||
2006-04-24 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/26869
|
||||
|
14
gcc/testsuite/g++.dg/other/incomplete2.C
Normal file
14
gcc/testsuite/g++.dg/other/incomplete2.C
Normal file
@ -0,0 +1,14 @@
|
||||
// PR c++/19963
|
||||
// { dg-do compile }
|
||||
|
||||
struct A;
|
||||
|
||||
struct B
|
||||
{
|
||||
A a : 1; // { dg-error "incomplete" }
|
||||
};
|
||||
|
||||
struct S
|
||||
{
|
||||
S : 1; // { dg-error "incomplete" }
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user