PR C/43211
* c-decl.c (grokparms): Set arg_types to NULL_TREE if there was an error.
2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com>
PR C/43211
* gcc.dg/pr43211.c: New test.
* gcc.dg/pr18809-1.c: Don't expect an error when calling foo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157585
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com>
+
+ PR C/43211
+ * c-decl.c (grokparms): Set arg_types to NULL_TREE if there was an error.
+
2010-03-19 Bernd Schmidt <bernd.schmidt@codesourcery.com>
PR rtl-optimization/42258
TREE_VALUE (typelt) = error_mark_node;
TREE_TYPE (parm) = error_mark_node;
+ arg_types = NULL_TREE;
}
else if (VOID_TYPE_P (type))
{
error (errmsg);
TREE_VALUE (typelt) = error_mark_node;
TREE_TYPE (parm) = error_mark_node;
+ arg_types = NULL_TREE;
}
if (DECL_NAME (parm) && TREE_USED (parm))
+2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com>
+
+ PR C/43211
+ * gcc.dg/pr43211.c: New test.
+ * gcc.dg/pr18809-1.c: Don't expect an error when calling foo.
+
2010-03-19 Bernd Schmidt <bernd.schmidt@codesourcery.com>
PR rtl-optimization/42258
/* { dg-warning "declared" "declared" { target *-*-* } 6 } */
/* { dg-warning "scope" "scope" { target *-*-* } 6 } */
/* { dg-error "incomplete" "incomplete" { target *-*-* } 6 } */
-void bar() { foo(0); } /* { dg-error "formal" } */
+void bar() { foo(0); }
--- /dev/null
+/* { dg-do compile } */
+
+struct T;
+
+struct S {
+ void (*bar)(struct S);
+};
+
+void bar(struct T t) {} /* { dg-error "" } */
+
+void foo(struct S *s)
+{
+ s->bar = bar;
+}
+