PR c/26818
* c-decl.c (finish_struct): Skip erroneous fields.
* gcc.dg/struct-incompl-1.c: New test.
From-SVN: r113975
+2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/26818
+ * c-decl.c (finish_struct): Skip erroneous fields.
+
2006-05-22 Nick Clifton <nickc@redhat.com>
* config/cris/cris.opt (march): Remove VarExists attribute.
saw_named_field = 0;
for (x = fieldlist; x; x = TREE_CHAIN (x))
{
+ if (TREE_TYPE (x) == error_mark_node)
+ continue;
+
DECL_CONTEXT (x) = t;
if (TYPE_PACKED (t) && TYPE_ALIGN (TREE_TYPE (x)) > BITS_PER_UNIT)
+2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/26818
+ * gcc.dg/struct-incompl-1.c: New test.
+
2006-05-22 Richard Guenther <rguenther@suse.de>
PR testsuite/27708
--- /dev/null
+/* PR c/26818 */
+/* { dg-do compile } */
+
+struct __attribute__ ((packed)) A
+{
+ struct B b; /* { dg-error "incomplete" } */
+};