PR c/28502
* c-decl.c (validate_proto_after_old_defn): Return false on invalid
argument.
* gcc.dg/proto-1.c: New test.
From-SVN: r115957
2006-08-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c/28502
+ * c-decl.c (validate_proto_after_old_defn): Return false on invalid
+ argument.
+
PR c/27721
* c-typeck.c (build_modify_expr): Test earlier for non-lvalues.
for (;;)
{
- tree oldargtype = TYPE_MAIN_VARIANT (TREE_VALUE (oldargs));
- tree newargtype = TYPE_MAIN_VARIANT (TREE_VALUE (newargs));
+ tree oldargtype = TREE_VALUE (oldargs);
+ tree newargtype = TREE_VALUE (newargs);
+
+ if (oldargtype == error_mark_node || newargtype == error_mark_node)
+ return false;
+
+ oldargtype = TYPE_MAIN_VARIANT (oldargtype);
+ newargtype = TYPE_MAIN_VARIANT (newargtype);
if (END_OF_ARGLIST (oldargtype) && END_OF_ARGLIST (newargtype))
break;
2006-08-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c/28502
+ * gcc.dg/proto-1.c: New test.
+
PR c/27721
* gcc.dg/lvalue-4.c: New test.
--- /dev/null
+/* PR c/28502 */
+/* { dg-do compile } */
+
+void foo() {} /* { dg-error "previous" } */
+void foo(void[]); /* { dg-error "array of voids" } */