PR c/64778
* c-typeck.c (convert_arguments): Return -1 if there are
error_args, even if we've diagnosed too many arguments.
* gcc.dg/pr64778.c: New test.
From-SVN: r220138
+2015-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64778
+ * c-typeck.c (convert_arguments): Return -1 if there are
+ error_args, even if we've diagnosed too many arguments.
+
2015-01-21 Richard Biener <rguenther@suse.de>
PR middle-end/64313
else
error_at (loc, "too many arguments to function %qE", function);
inform_declaration (fundecl);
- return parmnum;
+ return error_args ? -1 : (int) parmnum;
}
if (selector && argnum > 2)
+2015-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64778
+ * gcc.dg/pr64778.c: New test.
+
2015-01-26 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64421
--- /dev/null
+/* PR c/64778 */
+/* { dg-do compile } */
+
+int
+foo (int p)
+{
+ int a;
+ a ^= foo (,); /* { dg-error "expected expression before|too many arguments" } */
+ return a;
+}